From 700adb32e9cef98c1acddfd8ef4967471c44faa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 22 Dec 2022 16:19:47 +0100 Subject: [PATCH] nixos/sane: point SANE_CONFIG_DIR away from /etc/sane.d This brings back the ability to e.g. configure sane-airscan with `environment.etc."sane.d/airscan.conf".text = ...`. (AFAICT, sane-airscan loads all config files it finds, so it'll first load the one from the nixos hardware.sane.* configuration, then the user specified one in /etc/sane.d/airscan.conf.) Fixes: 4fbec87a5bfc ("nixos/sane: point env vars to /etc for quick reload") Fixes https://github.com/NixOS/nixpkgs/issues/207262 --- nixos/modules/services/hardware/sane.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/hardware/sane.nix b/nixos/modules/services/hardware/sane.nix index 60354c7644f7..2cac2e8e8bb4 100644 --- a/nixos/modules/services/hardware/sane.nix +++ b/nixos/modules/services/hardware/sane.nix @@ -28,7 +28,7 @@ let }; env = { - SANE_CONFIG_DIR = "/etc/sane.d"; + SANE_CONFIG_DIR = "/etc/sane-config"; LD_LIBRARY_PATH = [ "/etc/sane-libs" ]; }; @@ -167,7 +167,7 @@ in environment.systemPackages = backends; environment.sessionVariables = env; - environment.etc."sane.d".source = config.hardware.sane.configDir; + environment.etc."sane-config".source = config.hardware.sane.configDir; environment.etc."sane-libs".source = "${saneConfig}/lib/sane"; services.udev.packages = backends;