nixos/system-environment: use pam syntax for home variable
This commit is contained in:
parent
99df63be0a
commit
57481b7a1c
|
@ -78,9 +78,7 @@ in
|
|||
# We're trying to use the same syntax for PAM variables and env variables.
|
||||
# That means we need to map the env variables that people might use to their
|
||||
# equivalent PAM variable.
|
||||
# Note: PAM_USER is a PAM_ITEM, HOME is an environment variable, they have
|
||||
# different syntax.
|
||||
replaceEnvVars = replaceStrings ["$HOME" "$USER"] ["\${HOME}" "@{PAM_USER}"];
|
||||
replaceEnvVars = replaceStrings ["$HOME" "$USER"] ["@{HOME}" "@{PAM_USER}"];
|
||||
|
||||
pamVariable = n: v:
|
||||
''${n} DEFAULT="${concatStringsSep ":" (map replaceEnvVars (toList v))}"'';
|
||||
|
|
Loading…
Reference in New Issue