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
 
  25   # DebugNote: SANE_DEBUG_NET=128 SANE_NET_HOSTS=aubergine.local scanimage --dev=net:aubergine.local:hpaio:/usb/Deskjet_1510_series?serial=CN53P2F1N105YR  --mode Color --resolution 100 --progress --format jpeg --compression JPEG  >out100.jpg
 
  29       data_portrange = 40000 - 40100
 
  33   systemd.services."saned@" = {
 
  34     #environment.SANE_DEBUG_HPAIO = "128";
 
  35     #environment.SANE_DEBUG_NET   = "128";
 
  37   networking.nftables.ruleset =
 
  38     lib.optionalString config.services.printing.openFirewall ''
 
  41           tcp dport ipp counter accept comment "cupsd: IPP"
 
  45     + lib.optionalString config.services.saned.enable ''
 
  47         ct helper conntrack-sane {
 
  48           type "sane" protocol tcp;
 
  51           # This will track saned's data port for `ct related`
 
  52           tcp dport sane-port counter ct helper set "conntrack-sane"
 
  55           tcp dport sane-port counter accept comment "saned: control port"
 
  56           # NoticeNote: not actually useful because there is a rule `ct related accept` before
 
  57           ct helper "sane" counter accept comment "saned: data ports"