2024-12-22 23:54:16 +01:00
|
|
|
{ pkgs, ... }: {
|
2024-08-11 22:48:30 +02:00
|
|
|
# Enable CUPS to print documents.
|
|
|
|
services.printing.enable = true;
|
2024-11-02 18:50:41 +01:00
|
|
|
|
|
|
|
# Auto-detect network printers
|
|
|
|
services.avahi = {
|
|
|
|
enable = true;
|
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
|
|
|
};
|
|
|
|
|
2024-08-11 22:48:30 +02:00
|
|
|
services.printing.drivers = [
|
2025-01-01 21:40:43 +01:00
|
|
|
(pkgs.writeTextDir "share/cups/model/kyocera_fs-1300d.ppd"
|
|
|
|
(builtins.readFile ../../files/kyocera_fs-1300d.ppd))
|
2024-08-11 22:48:30 +02:00
|
|
|
];
|
|
|
|
hardware.printers = {
|
|
|
|
ensurePrinters = [
|
|
|
|
{
|
|
|
|
name = "Kyocera_FS-1300D";
|
|
|
|
location = "Office";
|
|
|
|
deviceUri = "socket://172.16.0.4:9100";
|
|
|
|
model = "kyocera_fs-1300d.ppd";
|
|
|
|
ppdOptions = {
|
|
|
|
PageSize = "A4";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
ensureDefaultPrinter = "Kyocera_FS-1300D";
|
|
|
|
};
|
|
|
|
}
|