Not really sure what is causing this all of a sudden, but I notice that things that I recently added which should be in my PATH are not there, and I have to run home-manager switch again (with no change to the config files) to have it switch to the actual “latest” generation, which was working just fine before reboot. I use it separately from nixos-rebuild. Any idea what could cause this?
One possibility: do you have any login scripts (.bashrc, .bash-profile, .zshrc, .zprofile, etc.) that set the PATH, that are not managed by home-manager? As far as I understand, if your home.nix
has
programs = { zsh.enable = true; bash.enable = true; }
it will overwrite .zshrc, .bashrc, (and potentially other files, depending on the rest of the home.* configuration) when running home-manager switch
, and those files should persist across logins. If you have your own versions of those files though, they might be overwriting the PATH on login.
All I can really think of is that I did make some changes to the programs.fish.functions
attribute set, possibly before this started happening, but I can’t be sure. I don’t really manage any of my dotfiles outside of home-manager anymore.
are you maybe booting an old NixOS generation that did use the NixOS module for home-manager? Or have you never used the NixOS module?
No I’m pretty sure I’ve never used it as a NixOS module on this install.
So I’ve just noticed something interesting. I keep getting a warning about an error in my window manager configuration when I log in. Thing is, I fixed this error several days ago, but for some reason it’s reverting to an older version of the file somehow. I ran home-manager switch (which replaces the config file with the correct version and fixes the problem), deleted all of the old generations, then rebooted the system and I get the error message again…and somehow there’s a new home manager generation I didn’t manually create, and which contains the bugged version of my WM config.
Any idea what’s going on? I’m really confused at this point.