Files
home-manager/tests/modules/programs/fish/session-variables.nix
Ian Chamberlain af7f14ddf7 fish: expose session variables package
This allows fish users to source the `hm-session-vars.fish` if they are
not using the generated `config.fish` (which now sources the same file).
2026-01-08 10:25:35 +01:00

21 lines
467 B
Nix

{ config, ... }:
{
config = {
home.sessionVariables = {
V1 = "v1";
V2 = "v2-${config.home.sessionVariables.V1}";
};
programs.fish.enable = true;
nmt.script = ''
assertFileExists home-path/etc/profile.d/hm-session-vars.fish
assertFileRegex home-path/etc/profile.d/hm-session-vars.fish \
"set -gx V1 'v1'"
assertFileRegex home-path/etc/profile.d/hm-session-vars.fish \
"set -gx V1 'v1'"
'';
};
}