mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 23:21:02 +01:00
Replace naive string quoting with lib.escapeShellArg for proper shell escaping of special characters, spaces, and quotes. Integrate with new formatShellArrayContent for intelligent multi-line array formatting in zsh array definitions. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
18 lines
351 B
Nix
18 lines
351 B
Nix
{ config, ... }:
|
|
|
|
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
|
|
sessionVariables = {
|
|
V1 = "v1";
|
|
V2 = "v2-${config.programs.zsh.sessionVariables.V1}";
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.zshenv
|
|
assertFileRegex home-files/.zshenv 'export V1=v1'
|
|
assertFileRegex home-files/.zshenv 'export V2=v2-v1'
|
|
'';
|
|
}
|