diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2014-05-27 02:31:27 -0700 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2014-05-27 02:31:27 -0700 |
commit | 80cc011f7763099fed75cd65647477ebec3294b4 (patch) | |
tree | 154ff437f364677b3a202d6903847571a568934c /nixos/modules/services | |
parent | aa9776028524986d1ef3272f1ec3f832277679cd (diff) | |
parent | 8ffd6af27e6dfae0a3b4d77db03409f62c5b8d98 (diff) | |
download | nixlib-80cc011f7763099fed75cd65647477ebec3294b4.tar nixlib-80cc011f7763099fed75cd65647477ebec3294b4.tar.gz nixlib-80cc011f7763099fed75cd65647477ebec3294b4.tar.bz2 nixlib-80cc011f7763099fed75cd65647477ebec3294b4.tar.lz nixlib-80cc011f7763099fed75cd65647477ebec3294b4.tar.xz nixlib-80cc011f7763099fed75cd65647477ebec3294b4.tar.zst nixlib-80cc011f7763099fed75cd65647477ebec3294b4.zip |
Merge pull request #2617 from ttuegel/hplip
hplip: update and fix scanning
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/hardware/sane.nix | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index 01d910575bb5..56e28b50350b 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -5,6 +5,8 @@ with lib; let pkg = if config.hardware.sane.snapshot then pkgs.saneBackendsGit else pkgs.saneBackends; + backends = [ pkg ] ++ config.hardware.sane.extraBackends; + saneConfig = pkgs.mkSaneConfig { paths = backends; }; in @@ -26,6 +28,12 @@ in description = "Use a development snapshot of SANE scanner drivers."; }; + hardware.sane.extraBackends = mkOption { + type = types.listOf types.path; + default = []; + description = "Packages providing extra SANE backends to enable."; + }; + }; @@ -33,8 +41,12 @@ in config = mkIf config.hardware.sane.enable { - environment.systemPackages = [ pkg ]; - services.udev.packages = [ pkg ]; + environment.systemPackages = backends; + environment.variables = { + SANE_CONFIG_DIR = "${saneConfig}/etc/sane.d"; + LD_LIBRARY_PATH = [ "${saneConfig}/lib/sane" ]; + }; + services.udev.packages = backends; users.extraGroups."scanner".gid = config.ids.gids.scanner; |