1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-06 03:09:45 +01:00
home-manager/tests/modules/programs/zsh/session-variables.nix
2021-07-18 23:34:50 +02:00

25 lines
512 B
Nix

{ 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"'
'';
};
}