2024-11-03 00:25:59 -05:00
|
|
|
{flake, ...}: let
|
|
|
|
inherit (flake.config.system.device) printer0 printer1;
|
|
|
|
geneticPPD = "drv:///sample.drv/generic.ppd";
|
|
|
|
pageSize = "Letter";
|
|
|
|
in {
|
2024-10-06 15:25:05 -05:00
|
|
|
hardware.printers = {
|
|
|
|
ensurePrinters = [
|
|
|
|
{
|
2024-11-03 00:25:59 -05:00
|
|
|
name = printer0.label;
|
2024-10-06 15:25:05 -05:00
|
|
|
location = "Downstairs";
|
2024-11-03 00:25:59 -05:00
|
|
|
deviceUri = "https://${printer0.ip.address0}";
|
|
|
|
model = geneticPPD;
|
2024-10-06 15:25:05 -05:00
|
|
|
ppdOptions = {
|
2024-11-03 00:25:59 -05:00
|
|
|
PageSize = pageSize;
|
2024-10-06 15:25:05 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
2024-11-03 00:25:59 -05:00
|
|
|
name = printer1.label;
|
2024-10-06 15:25:05 -05:00
|
|
|
location = "Upstairs";
|
2024-11-03 00:25:59 -05:00
|
|
|
deviceUri = "https://${printer1.ip.address0}";
|
|
|
|
model = geneticPPD;
|
2024-10-06 15:25:05 -05:00
|
|
|
ppdOptions = {
|
2024-11-03 00:25:59 -05:00
|
|
|
PageSize = pageSize;
|
2024-10-06 15:25:05 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2024-11-03 00:25:59 -05:00
|
|
|
ensureDefaultPrinter = printer1.label;
|
2024-11-01 17:44:27 -05:00
|
|
|
};
|
2024-11-03 00:25:59 -05:00
|
|
|
|
2024-11-01 17:44:27 -05:00
|
|
|
networking = {
|
|
|
|
firewall = {
|
|
|
|
allowedTCPPorts = [
|
|
|
|
631
|
|
|
|
];
|
|
|
|
};
|
2024-10-06 15:25:05 -05:00
|
|
|
};
|
|
|
|
}
|