I use Nix to manage:
- a desktop running NixOS (primary work machine)
- a Macbook (secondary/travel work machine)
- a Linux VM on WSL
- two servers (a raspberrypi in my closet and a Hetzner vps)
I keep my config on Github (latest branch https://github.com/alexghr/nix/tree/host/vader). I'm still new to this so a lot of my config is duplicated across different hosts but I want to refactor it to eliminate duplication.
If you haven't yet, I'd recommend giving Nix/NixOS a try. There's a bit of a learning curve but it's very powerful.
It's crazy how good nixos+git gets when you've iterated for a while. I'm using the same setup on my work laptop, my home PC, and my router.
Coming up on my 1 year anniversary with NixOS and couldn't be happier, even though it has taken quite some time to adjust to (and I still barely know the language).
Having one place for all configurations is such a breath of fresh air, and having my work & home PC being identical (even Gnome is declaraticely configured!) is so nice.
Before NixOS, I resented using my private PC because it was never up to date with what I had configured on my work PC, but now that's just a "git pull && nixos-revuild switch --flake ." away - regardless of what has changed.
One of the things I love the most about it is that we can use CI to update flake inputs and build configs on a cadence, which is almost like having dependabot for machine configuration.
I've been a sysadmin since I was 12, FreeBSD, Debian, Arch, Windows (sigh).
I've been an SRE managing 1k+ mixed machines. I've done nomad, k8s, docker-compose, podman, ansible, powershell admin, firecracker, gitops...
I will never, ever, use anything that doesn't behave like NixOS again. It is a sea-change.
Is the language weird? Oh yes. Is the documentation scattered? Quite. It's all worth it.
If the love of your live spoke a different native language, you'd learn it.
Stick to defaults? Hell no. Own your computing life.
Nix learning curve wouldn't be bad if the documentation wasn't so bad. I have had to put together my configuration based on couple of blogposts from randoms.
Documentation (and cli assuming you use nix-command) today is bounds better than in the past. A huge shoutout to Jon Ringer who always seems to pop up making a positive impact whenever I google something nix-related.
If you're trying to do something with Nix and it works, neat.
If you're trying to do something and can't get it to work, you'll have a very difficult time. (It demands a depth of understanding, and Nix is a bit weird).
Hopefully in future, "documentation", "blogposts from randoms", etc. help alleviate that pain as more people use it.
I keep my config on Github (latest branch https://github.com/alexghr/nix/tree/host/vader). I'm still new to this so a lot of my config is duplicated across different hosts but I want to refactor it to eliminate duplication.
If you haven't yet, I'd recommend giving Nix/NixOS a try. There's a bit of a learning curve but it's very powerful.