diff options
Diffstat (limited to 'infra/libkookie/home-manager/tests/modules/programs/zsh/session-variables.nix')
-rw-r--r-- | infra/libkookie/home-manager/tests/modules/programs/zsh/session-variables.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/infra/libkookie/home-manager/tests/modules/programs/zsh/session-variables.nix b/infra/libkookie/home-manager/tests/modules/programs/zsh/session-variables.nix new file mode 100644 index 000000000000..ca903619d684 --- /dev/null +++ b/infra/libkookie/home-manager/tests/modules/programs/zsh/session-variables.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + programs.zsh = { + enable = true; + + sessionVariables = { + V1 = "v1"; + V2 = "v2-${config.programs.zsh.sessionVariables.V1}"; + }; + }; + + nixpkgs.overlays = [ + (self: super: { + zsh = pkgs.writeScriptBin "dummy-zsh" ""; + }) + ]; + + nmt.script = '' + assertFileExists home-files/.zshrc + assertFileRegex home-files/.zshrc 'export V1="v1"' + assertFileRegex home-files/.zshrc 'export V2="v2-v1"' + ''; + }; +} |