Over time, my approach to NixOS has changed. Now I want to do as much as possible with home-manager and only the minimum necessary in configuration.nix. Has anyone else tried this approach? (Arguments why this isn’t a good idea are also welcome.)
This is likely to be an ongoing journey and I will chronicle what I discover as I go. My strategy is to start with a minimal configuration.nix with a single user account. Everything else will be configured with home-manager unless I need to add something to configuration.nix (mostly drivers I hope).
I try to keep my system configuration minimal and do as much as possible through the user configuration.
I do not want a change in my editor configuration to break the bootability of the system, while at the same time, I do not want that an update in some system software causes me to roll back my editor configuration.
Thats why I use separate configurations.
At https://github.com/nobbz/nixos-configuration you can see my flake which defines 3 systems and 3 user environments.
My system configuration is currently still mostly bare
hardware-configuration.nix with with a minimum of modules.
On the other hand side my users configuration also uses a lot of modules to do complicated stuff to generate even more complicated configuration for my emacs and other stuff.
This approach does not only have the pros I already mentioned, but also allows to use those modules from a WSL (which I already do but not have properly done on the overhaul branch yet) or on my daddies Ubuntu which is also currently not yet in the flake.