Open sim4life opened 1 month ago
The solution was to write in home.nix
:
programs.bash.enable = true;
It wasn't mentioned anywhere in Home-Manager Manual or Appendix. Perhaps it can be added to this document: Home Manager Manual
It can easily save precious hours/days of busy developers, whom are making use of Nix home-manager to maintain their work machines.
The manual mentions that session variables have to be manually sourced if Home Manager isn't managing your shell configuration: https://nix-community.github.io/home-manager/index.xhtml#_why_are_the_session_variables_not_set
@Liassica Yes but @sim4life "s point is that the alternative ie set programs.bash.enable = true; is not explicitly documented.
The implicit reference is
If you do not plan on having Home Manager manage your shell configuration
Now if you know Home manager you know that this includes enabling shells. If you are a beginner then this implication just means nothing.
Are you following the right branch?
Is there an existing issue for this?
Issue description
Using WSL inside powershell, I installed home-manager v24.05 using curl and used Nixpkgs v24.05 channel. Then edited
~/.config/home-manager/home.nix
and added:xdg.enable = true;
Afterwards, on the command line I run
home-manager switch
; I getXDG_RUNTIME_DIR
and non-standard value ofXDG_DATA_DIRS
but I don't get to have other XDG_XXX environment variables created and assigned with proper values.my ~/.config/home-manager/home.nix is:
Any simple fix?
Maintainer CC
@ryce
System information