summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/hardware/sane.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/hardware/sane.nix')
-rw-r--r--nixos/modules/services/hardware/sane.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix
index dd5c65b1f6a6..fe6dd268df60 100644
--- a/nixos/modules/services/hardware/sane.nix
+++ b/nixos/modules/services/hardware/sane.nix
@@ -126,6 +126,15 @@ in
'';
};
+ hardware.sane.openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = lib.mdDoc ''
+ Open ports needed for discovery of scanners on the local network, e.g.
+ needed for Canon scanners (BJNP protocol).
+ '';
+ };
+
services.saned.enable = mkOption {
type = types.bool;
default = false;
@@ -163,6 +172,7 @@ in
services.udev.packages = backends;
users.groups.scanner.gid = config.ids.gids.scanner;
+ networking.firewall.allowedUDPPorts = mkIf config.hardware.sane.openFirewall [ 8612 ];
})
(mkIf config.services.saned.enable {