diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/hardware/sane.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/hardware/sane.nix | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/nixpkgs/nixos/modules/services/hardware/sane.nix b/nixpkgs/nixos/modules/services/hardware/sane.nix index 03070a8f9e7c..e5a01a8a27d9 100644 --- a/nixpkgs/nixos/modules/services/hardware/sane.nix +++ b/nixpkgs/nixos/modules/services/hardware/sane.nix @@ -4,9 +4,7 @@ with lib; let - pkg = if config.hardware.sane.snapshot - then pkgs.sane-backends-git - else pkgs.sane-backends; + pkg = pkgs.sane-backends; sanedConf = pkgs.writeTextFile { name = "saned.conf"; @@ -32,7 +30,7 @@ let }; backends = [ pkg netConf ] ++ optional config.services.saned.enable sanedConf ++ config.hardware.sane.extraBackends; - saneConfig = pkgs.mkSaneConfig { paths = backends; }; + saneConfig = pkgs.mkSaneConfig { paths = backends; inherit (config.hardware.sane) disabledDefaultBackends; }; enabled = config.hardware.sane.enable || config.services.saned.enable; @@ -75,6 +73,16 @@ in example = literalExample "[ pkgs.hplipWithPlugin ]"; }; + hardware.sane.disabledDefaultBackends = mkOption { + type = types.listOf types.str; + default = []; + example = [ "v4l" ]; + description = '' + Names of backends which are enabled by default but should be disabled. + See <literal>$SANE_CONFIG_DIR/dll.conf</literal> for the list of possible names. + ''; + }; + hardware.sane.configDir = mkOption { type = types.str; internal = true; |