aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/programs/zsh/session-variables.nix
blob: a87d39820cfeca38d30995fe3e887988beee7169 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ config, lib, ... }:

with lib;

{
  config = {
    programs.zsh = {
      enable = true;

      sessionVariables = {
        V1 = "v1";
        V2 = "v2-${config.programs.zsh.sessionVariables.V1}";
      };
    };

    nmt.script = ''
      assertFileExists home-files/.zshrc
      assertFileRegex home-files/.zshrc 'export V1="v1"'
      assertFileRegex home-files/.zshrc 'export V2="v2-v1"'
    '';
  };
}