1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00
home-manager/tests
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
..
integration restic: fix integration test 2025-09-17 16:24:18 +02:00
lib lib: Improve KDL generator (#7429) 2025-07-12 14:32:14 -05:00
modules zsh: source session variable file directly 2025-09-30 07:50:26 -05:00
asserts.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
big-test.nix treewide: Prevent IFD by default 2025-05-07 10:34:18 -05:00
darwinScrublist.nix tests/darwinScrublist: add zsh-history-substring-search 2025-09-27 13:18:01 -05:00
default.nix xdg-mime-apps: add defaultApplicationPackages option 2025-09-19 16:23:57 +02:00
flake.nix tests: rename test-all-* tests 2025-09-28 16:26:13 -05:00
stubs.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
tests.py tests: improve debugging for failed test runs 2025-09-28 16:28:05 -05:00