Merge pull request #199520 from bjornfor/nixos-hardware-sane-open-firewal

nixos/sane: add openFirewall option

authored by Ryan Lahfa and committed by GitHub da5ef17a 8fcd4cbe

+10
+10
nixos/modules/services/hardware/sane.nix
··· 126 126 ''; 127 127 }; 128 128 129 + hardware.sane.openFirewall = mkOption { 130 + type = types.bool; 131 + default = false; 132 + description = lib.mdDoc '' 133 + Open ports needed for discovery of scanners on the local network, e.g. 134 + needed for Canon scanners (BJNP protocol). 135 + ''; 136 + }; 137 + 129 138 services.saned.enable = mkOption { 130 139 type = types.bool; 131 140 default = false; ··· 163 172 services.udev.packages = backends; 164 173 165 174 users.groups.scanner.gid = config.ids.gids.scanner; 175 + networking.firewall.allowedUDPPorts = mkIf config.hardware.sane.openFirewall [ 8612 ]; 166 176 }) 167 177 168 178 (mkIf config.services.saned.enable {