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: 4fbec87a5b ("nixos/sane: point env vars to /etc for quick reload")

Fixes https://github.com/NixOS/nixpkgs/issues/207262
This commit is contained in:
Bjørn Forsman 2022-12-22 16:19:47 +01:00
parent d70cee46ab
commit 700adb32e9

View File

@ -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;