From 94deea203566bd88ec1315ede95a4819d12f2976 Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Tue, 24 Jun 2014 10:52:12 +0200 Subject: [PATCH] nixos: Add option hardware.sane.configDir --- nixos/modules/services/hardware/sane.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index bbb59312753..3bf765c6f99 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -34,6 +34,12 @@ in description = "Packages providing extra SANE backends to enable."; }; + hardware.sane.configDir = mkOption { + type = types.string; + default = "${saneConfig}/etc/sane.d"; + description = "The value of SANE_CONFIG_DIR."; + }; + }; @@ -43,7 +49,7 @@ in environment.systemPackages = backends; environment.sessionVariables = { - SANE_CONFIG_DIR = mkDefault "${saneConfig}/etc/sane.d"; + SANE_CONFIG_DIR = config.hardware.sane.configDir; LD_LIBRARY_PATH = [ "${saneConfig}/lib/sane" ]; }; services.udev.packages = backends;