4 ms·
I don't think the benefits of defining your system config in this way are immediately visible after one month. I kind of loathed reinstalling Linux before NixOS
by steinuil 2y ago
I don't think the benefits of defining your system config in this way are immediately visible after one month. I kind of loathed reinstalling Linux before NixOS because I knew I'd have to spend a lot of time remembering how to reinstall and configure my desktop environment, reconfiguring sshd, fixing font rendering and setting a fallback I liked, reinstalling all my terminal utilities and copying their config files over, setting caps lock to esc, and all those little changes I made to my previous installation that I'd inevitably forgot to record.
For servers that's even more relevant: I usually logged into my home raspberry pi every once in a while because I needed to fix something and I didn't even know what services were running on it!
With NixOS it's all comparatively simple: I switched my gaming PC to NixOS a few months ago and while I had to reconfigure some things like display settings, everything else just immediately worked exactly the same as on my laptop after installing.
I set up nix-darwin on my work macbook and share all my dev environment's configuration with my other computers. Now if I change some Helix settings on the macbook, I just have to commit them to my flake (which is just a git repo) and to get those changes on my desktop as well I just have to pull and rebuild.
If I want to install some new service on my home server I just open the relevant configuration.nix file in my config, enable an option, build it locally to check that everything's working, and push the changes to my server.
I don't ever feel the need to do a clean reinstall of my system because everything is already as clean as can be, and if I really wanted to it'd just be a matter of backing up /var and /home, putting the nixos installer on a usb stick, and running nixos-rebuild from there.
I think the benefits of NixOS come into play months down the line, when a problem comes up and all the specific knowledge about what you did with your setup has faded from memory, but all the operational knowledge on how to use Nix is still there.
Edit: I'd recommend trying out NixOS a server or VPS and installing Nix with home-manager on your usual distro for a while. That might give you a taste of what you can do with NixOS without having to fully commit to having it as your main OS and doing everything the "nix way".
- aquova 2y agoI haven't tried Nix on a server, but it has tempted me for the reasons you've described above. I frankly don't recall many of the configuration steps I made ages ago, and having a single configuration to handle the ports and services seems like it could be a great benefit. I'll need to try it out someday, but as you mentioned, I'm not in the habit of reinstalling servers unless I really have to haha.
- steinuil 2y agoI was almost a bit shocked when I wanted to install vaultwarden on my VPS that I hadn't touched in months and all I had to do was set `services.vaultwarden.enable = true` and reverse proxy it in the nginx config. It was like "...that's it?"
- LorenzoGood 2y agoI took this even further, and run the "impermanence" setup, where my whole system is cleaned on every reboot.