diff options
author | Profpatsch <mail@profpatsch.de> | 2017-07-10 15:08:08 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-07-10 15:08:08 +0200 |
commit | 25bbcf332c90e4b584f644d0058807813881a502 (patch) | |
tree | 6e1cb2cfb2165a0b154e35a2f128b22693092e83 /modules/user/profpatsch | |
parent | e8e506de9b3b1cddd4f4cb9edb85f1e292a2b1e1 (diff) |
modules/profpatsch/scannning: add option to list remote scanners
sane has a file called `net.conf` which is a list of hosts that are searched for remote scanners.
Diffstat (limited to 'modules/user/profpatsch')
-rw-r--r-- | modules/user/profpatsch/programs/scanning.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/modules/user/profpatsch/programs/scanning.nix b/modules/user/profpatsch/programs/scanning.nix index 831c440c..906cc95a 100644 --- a/modules/user/profpatsch/programs/scanning.nix +++ b/modules/user/profpatsch/programs/scanning.nix @@ -1,13 +1,28 @@ { config, pkgs, lib, ... }: with lib; -{ +let + cfg = config.vuizvui.user.profpatsch.programs.scanning; + +in { options.vuizvui.user.profpatsch.programs.scanning = { enable = mkEnableOption "scanning & simple-scan"; + + remoteScanners = mkOption { + type = lib.types.lines; + default = ""; + description = '' + See <literal>hardware.sane.extraBackends</literal>. + Proxy, because I may want to change this option. + ''; + }; }; - config = mkIf config.vuizvui.user.profpatsch.programs.scanning.enable { + config = mkIf cfg.enable { environment.systemPackages = [ pkgs.simple-scan ]; - hardware.sane.enable = true; + hardware.sane = { + enable = true; + netConf = cfg.remoteScanners; + }; }; } |