Just use NixOS. Not minimalist but very organized and feels comfortable
Right now I have a VM running NixOS, so I can figure things out. What annoys me is that when asked to list all the programs I want to use, I struggle, but installing things on the fly is so much more easier. Nix-env does that, but it doesn’t add it to a /etc/nixos/configuration.nix, does it? Also, I know about home-manager, but I’ve heard it’s extrememly difficult.
No, nix-env
installs to your user environment, which the nixos-rebuild
command barely touches. It doesn’t touch the global configuration file. In fact you can even manage user accounts imperatively.
My approach is the following: try a program using nix run
(or nix-shell
, depending on the case) and if it does what I want, add it to my configuration and nixos-rebuild test
. It will then be available permanently on next update.
What I also do is keep all nix-related files in a git repository under main user control and have the flake.nix
(if using flakes, otherwise configuration.nix
) soft linked into /etc/nixos
. This also enables rollback on your configuration, not only on the actual system state.
I agree that each package takes more time, but OTOH, you save a lot of time and effort in the longer run. Also I don’t really have that high fluctuation of packages that it actually matters.
home-manager
is a bit in a weird spot in my opinion as in it’s not very clear how it should be installed. If it’s a NixOS module, your changes will only be applied during rebuild - which only root can trigger. But if you’re already triggering those as root, you might as well as the packages globally. I generally install globally and configure the options using home-manager
.
Sounds great, but I don’t like editing a config file every time I want to install an app,.