2.home-manager/tests/modules/programs/zsh
Thiago Kenji Okada 9e0453a9b0 zsh: source session variable file directly
Right now we load `hm-session-vars.sh` from
`config.home.profileDirectory`, generally resulting in the following
code being generated in `zshenv`:

```
. "/etc/profiles/per-user/<username>/etc/profile.d/hm-session-vars.sh"
```

This is problematic in a few situations. For example, when entering a
`distrobox` environment I got the following error:

```
/home/<username>/.zshenv:.:2: no such file or directory: /etc/profiles/per-user/<username>/etc/profile.d/hm-session-vars.sh
```

Instead, let's point to the path directly to the `/nix/store` by using
`config.home.sessionVariablesPackage` instead. This is more robust and
it is more consistent with other things we source in ZSH.
2025-09-30 07:50:26 -05:00
..
aliases.nix zsh/history: optimize history options with array-based loops 2025-09-27 13:18:01 -05:00
default.nix zsh: optimize setOptions with array-based loops 2025-09-27 13:18:01 -05:00
dotdir.nix zsh: env var assertion for dotdir 2025-07-28 14:47:42 -05:00
history-ignore-pattern.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
history-path.nix zsh: relative path deprecation warning 2025-07-28 14:47:42 -05:00
history-substring-search-expected.zshrc zsh/plugins: optimize plugin loading with array-based loops 2025-09-27 13:18:01 -05:00
history-substring-search.nix zsh/plugins: optimize plugin loading with array-based loops 2025-09-27 13:18:01 -05:00
plugins.nix zsh/plugins: optimize plugin loading with array-based loops 2025-09-27 13:18:01 -05:00
prezto.nix zsh: source session variable file directly 2025-09-30 07:50:26 -05:00
session-variables.nix lib/zsh: revert escapeShellArg in toZshValue 2025-09-28 14:44:14 -05:00
session-variables.zshenv zsh: envVarsStr fix indentation 2025-09-28 14:44:14 -05:00
siteFunctions-mkcd.nix zsh: option to define autoloadable site-functions (#7611) 2025-08-05 14:03:10 -05:00
smart-formatting-expected.zshrc tests/zsh: add comprehensive smart formatting test 2025-09-27 13:18:01 -05:00
smart-formatting.nix tests/zsh: add comprehensive smart formatting test 2025-09-27 13:18:01 -05:00
syntax-highlighting.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
zprof.nix tests/zsh: add zprof test 2025-07-12 11:42:00 -05:00
zsh-abbr.nix zsh: group plugins in a separate directory 2025-07-12 11:42:00 -05:00
zshrc-content-priorities.nix zsh/history: optimize history options with array-based loops 2025-09-27 13:18:01 -05:00