9 ../../nixos/profiles/printing.nix
10 ../../nixos/profiles/hardware/HP_Deskjet_1510.nix
13 listenAddresses = [ "*:631" ];
16 allowFrom = [ "all" ];
20 DefaultEncryption IfRequested
24 # DebugNote: SANE_DEBUG_NET=128 SANE_NET_HOSTS=aubergine.local scanimage -L
28 data_portrange = 40000 - 40100
32 systemd.services."saned@" = {
33 #environment.SANE_DEBUG_HPAIO = "128";
34 #environment.SANE_DEBUG_NET = "128";
36 networking.nftables.ruleset =
37 lib.optionalString config.services.printing.openFirewall ''
40 tcp dport ipp counter accept comment "cupsd: IPP"
44 + lib.optionalString config.services.saned.enable ''
46 ct helper conntrack-sane {
47 type "sane" protocol tcp;
50 # This will track saned's data port for `ct related`
51 tcp dport sane-port counter ct helper set "conntrack-sane"
54 tcp dport sane-port counter accept comment "saned: control port"
55 # NoticeNote: not actually useful because there is a rule `ct related accept` before
56 ct helper "sane" counter accept comment "saned: data ports"