{ config, lib, pkgs, ... }: let cfg = config.sils.printing; in { options.sils.printing.enable = lib.mkEnableOption "printing configuration"; config = lib.mkIf cfg.enable { services = { printing = { enable = true; startWhenNeeded = true; webInterface = true; stateless = true; drivers = with pkgs; [epson-escpr epson-escpr2 hplip]; }; avahi = { enable = true; nssmdns4 = true; nssmdns6 = true; openFirewall = true; }; }; hardware.printers = { ensureDefaultPrinter = "EPSON_ET-2720_Series"; ensurePrinters = [ { name = "EPSON_ET-2720_Series"; description = "EPSON ET-2720 Series"; model = "epson-inkjet-printer-escpr/Epson-ET-2720_Series-epson-escpr-en.ppd"; location = "Home Network"; deviceUri = "dnssd://EPSON%20ET-2720%20Series._ipp._tcp.local/?uuid=cfe92100-67c4-11d4-a45f-e0bb9edcdbb9"; ppdOptions = { PageSize = "A4"; }; } ]; }; }; }