nixos/sane: point env vars to /etc for quick reload
Point $SANE_CONFIG_DIR and $LD_LIBRARY_PATH to symlinks in /etc, instead of directly to nix store paths, so that activating a new configuration takes effect immediately, instead of requiring users to re-login.
This commit is contained in:
parent
2ce9f6b6ac
commit
4fbec87a5b
|
@ -28,8 +28,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
SANE_CONFIG_DIR = config.hardware.sane.configDir;
|
SANE_CONFIG_DIR = "/etc/sane.d";
|
||||||
LD_LIBRARY_PATH = [ "${saneConfig}/lib/sane" ];
|
LD_LIBRARY_PATH = [ "/etc/sane-libs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
backends = [ pkg netConf ] ++ optional config.services.saned.enable sanedConf ++ config.hardware.sane.extraBackends;
|
backends = [ pkg netConf ] ++ optional config.services.saned.enable sanedConf ++ config.hardware.sane.extraBackends;
|
||||||
|
@ -156,6 +156,8 @@ in
|
||||||
|
|
||||||
environment.systemPackages = backends;
|
environment.systemPackages = backends;
|
||||||
environment.sessionVariables = env;
|
environment.sessionVariables = env;
|
||||||
|
environment.etc."sane.d".source = config.hardware.sane.configDir;
|
||||||
|
environment.etc."sane-libs".source = "${saneConfig}/lib/sane";
|
||||||
services.udev.packages = backends;
|
services.udev.packages = backends;
|
||||||
|
|
||||||
users.groups.scanner.gid = config.ids.gids.scanner;
|
users.groups.scanner.gid = config.ids.gids.scanner;
|
||||||
|
|
Loading…
Reference in a new issue