Config repository
Hi, I am trying to create a more cohesive home-manager configuration. It is functioning fine for me ATM but I’d like to not have to use sudo every time I change my program configs.
My original flake can be found on the main branch of the repository. I know for a fact this is incorrect. I had to add home-manager to the system environmentPackages to be able to run the command. Commenting out the home manager config under nixosConfigurations resulted in losing all of my programs until I ran home-manager switch --flake ~/nix-dotfiles/flake.nix. The output of nix flake show looks like this
Hey, please don’t answer with AI. The answer wasn’t what I was looking for and I would not be asking people on the forums if AI gave me a good answer, so all this achieves is to pollute forums where people come for answers from humans. I appreciate the intention though.
I am aware I have a mix of both the standalone and module installation of HM and I failed to mention it in my original post. My intention was to find a method that would install home-manager in a declarative manner but still allow me to use the home-manager command. Help still needed
Hi nobbz! I might be incorrect but I got the impression that a standalone home-manager install adds an additional step to setting up your NixOS. While your configuration is declarative, the actual installation portion of home-manager is implicit, i.e. you need to run an install command on top of nixos-rebuild when installing on a new system (not talking about home-manager switch, i am pretty sure you can also program your rebuilds to run that). That is if you choose the standalone method. Its a minor hiccup and thats exactly what the other method allows, but you dont get the home manager command with that and you need to rebuild when you want to see your user config changes.
Please correct me if I am wrong
Yes, it adds another step to the bootstrapping, though if you want to use the system module for easier bootstrap, you really should stick to applying your user changes using nixos-rebuild rather than home-manager.
Though indeed, if you have an already existing HM config, that you can use with the system, then bootstrapping HM is just nix run github:nix-community/home-manager -- switch --flake … or something alike.
You do not have to follow the nix-shell -A install thing that is in the docs. That is really only needed if you do a full bootstrap and do not even have an initial config, and even then you can use other templates or even start from a bare file in your editor.