nixos/sane: add openFirewall option
Open ports needed for discovery of scanners on the local network, e.g. needed for Canon scanners (BJNP protocol). Ref. https://github.com/NixOS/nixpkgs/issues/28406.
This commit is contained in:
parent
a704b90295
commit
c3cff074f8
@ -124,6 +124,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;
|
||||
@ -159,6 +168,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user