I just configured and switched to my standalone home config, but now whenever i do a nixos-rebuild switch. home manager is gone and i need to do nix run home-manager -- switch --flake . to get it running again, this isnt normal right? what is wrong?
What do you mean by “gone”? Is your shell configuration reverted or something like that?
It would be helpful if you could share snippets of your config.
i used to have hm as a module but am moving to standalone… i dont have any mention on hm on my configuration.nix file anymore, i moved everything to the flake and home.nix file
Fixed the error, literally i never added home-manager to environment.packages why is it that almost all tutorials teach using nix-shell instead of showing both.
You should probably add it to home.packages instead to ensure the home-manager config is self-contained, and then bootstrap it with nix-shell.
It’s a minor detail and unlikely to come up, but this prevents your home-manager binary version from going out of sync with the actually installed profile.
Combining that with knowledge of your other question, sounds like your home-manager is set up in such a way that its changes to $PATH - and likely environment variables - don’t actually happen.
Make sure you source the relevant rcfile, or that you use home-manager to configure your shell.
oh damn, that must be it, i do have a file installing some tools to my cli like btop or bat. i will try disabling those, but if i wanna have those i have then to declare on my hm right? how to do that?
update: tried turning off options that would add packages for cli like btop, bat and others, but nothing changed. also turned on programs.bash.enable on my home.nix nothing much has changed
i want to use zsh but i havent configured that yet.
i know it hard sorry, i have been trying to isolate the problem in a configuration i can share, will update when i have it done
(small update on this) after activating programs.bash.enable i tried creating an alias using programs.bash.alias.switchos = "sudo nixos-rebuild switch"; and it worked, maybe home path is being added and the problem is another.
im still working on a flake to expose
Hey there thanks for waiting, i managed to make my nixos repo public, you can access it here im very clueless on why nixvim is not working/ only working for su user
Hey so turns out very early when i was learning nix and configuring my computer i must have mistaken nix-env by nix-shell and added neovim imperatively.
took me several weeks and removing everything on my computer to figure this out.
after removing everything now works as expected.
thanks all for the help