Set session variables in the shell as well
This commit is contained in:
parent
f5055e2ef6
commit
13befa3979
2 changed files with 10 additions and 0 deletions
|
@ -149,6 +149,12 @@ in
|
|||
|
||||
system.build.binsh = pkgs.bashInteractive;
|
||||
|
||||
# Set session variables in the shell as well. This is usually
|
||||
# unnecessary, but it allows changes to session variables to take
|
||||
# effect without restarting the session (e.g. by opening a new
|
||||
# terminal instead of logging out of X11).
|
||||
environment.variables = config.environment.sessionVariables;
|
||||
|
||||
environment.etc."shells".text =
|
||||
''
|
||||
${concatStringsSep "\n" cfg.shells}
|
||||
|
|
|
@ -98,6 +98,10 @@ import ./make-test.nix {
|
|||
$machine->succeed("touch /tmp2/x");
|
||||
$machine->succeed("grep '/tmp2 tmpfs' /proc/mounts");
|
||||
};
|
||||
|
||||
subtest "shell-vars", sub {
|
||||
$machine->succeed('[ -n "$NIX_PATH" ]');
|
||||
};
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue