refactor: abstracted out printer info

This commit is contained in:
Nick 2024-11-03 17:51:58 -06:00
parent 0f016463f2
commit e1a23f5010

View file

@ -1,6 +1,6 @@
{flake, ...}: let {flake, ...}: let
inherit (flake.config.system.device) printer0 printer1; inherit (flake.config.system.device) printer0 printer1;
geneticPPD = "drv:///sample.drv/generic.ppd"; genericPPD = "drv:///sample.drv/generic.ppd";
pageSize = "Letter"; pageSize = "Letter";
in { in {
hardware.printers = { hardware.printers = {
@ -9,7 +9,7 @@ in {
name = printer0.label; name = printer0.label;
location = "Downstairs"; location = "Downstairs";
deviceUri = "https://${printer0.ip.address0}"; deviceUri = "https://${printer0.ip.address0}";
model = geneticPPD; model = genericPPD;
ppdOptions = { ppdOptions = {
PageSize = pageSize; PageSize = pageSize;
}; };
@ -18,7 +18,7 @@ in {
name = printer1.label; name = printer1.label;
location = "Upstairs"; location = "Upstairs";
deviceUri = "https://${printer1.ip.address0}"; deviceUri = "https://${printer1.ip.address0}";
model = geneticPPD; model = genericPPD;
ppdOptions = { ppdOptions = {
PageSize = pageSize; PageSize = pageSize;
}; };