fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Jian Linzsh: move sessionVariables from .zshrc to .zshenv (#2708)2116fe6b

master
446 B24 linesraw
1{ config, lib, pkgs, ... }:
2
3with lib;
4
5{
6  config = {
7    programs.zsh = {
8      enable = true;
9
10      sessionVariables = {
11        V1 = "v1";
12        V2 = "v2-${config.programs.zsh.sessionVariables.V1}";
13      };
14    };
15
16    test.stubs.zsh = { };
17
18    nmt.script = ''
19      assertFileExists home-files/.zshenv
20      assertFileRegex home-files/.zshenv 'export V1="v1"'
21      assertFileRegex home-files/.zshenv 'export V2="v2-v1"'
22    '';
23  };
24}