-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Claryfying the use of home-manager #16
Comments
I would also be really interested in the topic on how home manager is supposed to be used. Especially since I see quite a few nixos modules which specify home-manager stuff.. this is a bit confusing because it seems that the nixos modules are used like home modules. Edit: Another quick example which I'm confused about is why you have some things both in home and nixos modules. |
I am no expert and I cannot speak for Jake, so please do not let me confuse you, but I have been playing with the config files and my take so far is this: Home manager is used strictly as a single user account only, that is why you see the As you mentioned, I would rather not see any home manager invocations while I do my usual nixos-rebuild switch operations that are supposed to be system specific only (and not user/home-manager related). It "might" make sense to merge both system and user operations in a single command, if the systems are strictly single user. But that is not the existing documentation that is out there, and thus our confusion... :) In regards to setting up git with both nixos and home modules: Setting it up as nixos modules will populate configuration files in the global space (/etc/git/config, I believe) while with home modules they will go to ~/.config/git/config. Again, I am passing along my understanding so far in case some of this would "click" for you. I would still want to hear more from Jake though... :) |
Where do you handle users? I am using impermanence before snowfall and had to specify users in my
Now I am really puzzled as to where do I setup my users and how to setup them since the user configuration should go in |
I handle users primarily in two places. There's a common NixOS module I create that all my systems using my flake enable that creates me on all those systems. It includes the typical groups I use, and I use agenix-rekey to store an encryped hash of the password. This results in all my systems having me up and ready to login immediately after installation. Then there's the actual home-manager module. I have an entire "user" section of modules plus a common module for everything I'd want no matter what the system is. The impermanence module provides you with the means to persist any files you need, but using home-manager takes care of maybe 90% of what I need declaratively. You're welcome to look at my flake for how to use home-manager here. |
Do you mind explaining a bit how home-manager is triggered from your setup?
"Usually":
sudo nixos-rebuild switch --flake .#someHost
will trigger a nixos rebuild andhome-manager switch --flake .#someUser@someHost
will trigger a home-manager rebuiltBut in your repo just a nixos-rebuild would also trigger the home-manager. I would expect it would at least check the hostname and not trigger it if I build for a different host
At which point is the home-manager triggered? I believe this is a by-product of the snowfall lib, triggering it? I bet if I removed the
homes
folder I would eliminate the home-manager execution (haven't tried it yet).A by-product of this "issue" is that I (somehow) managed to get all my zsh to start with a double header of toilet 'Plus Ultra'. Checking the .zshrc I saw that it was sourcing the files twice. No idea how I managed that. Once I removed the zsh and starship configurations from
modules/nixos/user
the double sourcing got fixed (and back to a singlePlus Ultra
header in the terminals...I think you mentioned somewhere that you use case does not involve home-maager too much, as your systems are strictly single user, so maybe this is not a priority for you! But home-manager does make some things easier to configure, so if both could be clearly used this would be great.
This might be similar to #8, especially in regards that home-manager seems to be triggered for ALL hosts.
Once again, thanks.... :)
The text was updated successfully, but these errors were encountered: