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