diff options
Diffstat (limited to '')
-rw-r--r-- | modules/by-name/pr/printing/module.nix (renamed from modules/by-name/pi/printing/module.nix) | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/modules/by-name/pi/printing/module.nix b/modules/by-name/pr/printing/module.nix index cfcd2154..2e230570 100644 --- a/modules/by-name/pi/printing/module.nix +++ b/modules/by-name/pr/printing/module.nix @@ -19,6 +19,10 @@ in { }; config = lib.mkIf cfg.enable { + soispha.impermanence.directories = [ + "/var/lib/cups" + ]; + services.avahi = { enable = true; nssmdns4 = true; @@ -26,29 +30,21 @@ in { openFirewall = true; }; + users = { + users.avahi.uid = config.soispha.constants.ids.uids.avahi; + groups.avahi.gid = config.soispha.constants.ids.gids.avahi; + groups.lpadmin.gid = config.soispha.constants.ids.gids.lpadmin; + }; + services.printing = { enable = true; startWhenNeeded = true; webInterface = true; # deletes `/var/cache/cups`, `/var/lib/cups` and `/var/spool/cups` on cups startup - stateless = true; + stateless = false; drivers = []; }; - - hardware = { - printers = { - ensurePrinters = [ - { - name = "Brother"; - description = "Brother DCP-9022CDW"; - model = "everywhere"; - deviceUri = "dnssd://Brother%20DCP-9022CDW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-30055c773bcf"; - } - ]; - ensureDefaultPrinter = "Brother"; - }; - }; }; } |