2019-04-26 22:21:18 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.bash = {
|
|
|
|
enable = true;
|
2022-08-07 11:10:13 +00:00
|
|
|
enableCompletion = false;
|
2019-04-26 22:21:18 +00:00
|
|
|
|
|
|
|
sessionVariables = {
|
|
|
|
V1 = "v1";
|
|
|
|
V2 = "v2-${config.programs.bash.sessionVariables.V1}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.profile
|
|
|
|
assertFileContent \
|
|
|
|
home-files/.profile \
|
2021-05-17 22:46:04 +00:00
|
|
|
${
|
2022-01-01 17:06:55 +00:00
|
|
|
builtins.toFile "session-variables-expected" ''
|
2021-05-17 22:46:04 +00:00
|
|
|
. "/home/hm-user/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
|
|
|
|
|
|
|
export V1="v1"
|
|
|
|
export V2="v2-v1"
|
|
|
|
|
|
|
|
|
|
|
|
''
|
|
|
|
}
|
2019-04-26 22:21:18 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|