Maybe you disagree with those principles. Maybe you disagree with software having hard principles.
That's fine. NixOS isn't for you. It's wonderful for me though!
I literally cannot bork my machine. I can always roll back. Useful when messing with low-level stuff like drivers.
I have full control and understanding of updates and the exact versions of all the programs I run. I can always read the source of any program I'm running by looking in the nix store.
Super easy to package new programs and contribute to nixpkgs.
Super easy to tweak packaging other provided without forking via overlays.
I share config across devices in a git repo, so provisioning a new machine is trivial. I got a desktop and I basically imported a bunch of common config along with like 10 lines of config specific to the desktop.
So use a templated VM, or a filesystem with easy snapshotting like ZFS or BTRFS.
The former also allows for easy provisioning of new machines, and doesn't lock you down to a single OS.
And that doesn't have all the other benefits. Also it's a worse way to handle state and rollbacks. Sledgehammer for a thumbtack.
I already spent the time to learn the hard stuff. So now my life is made easy by NixOS. Same idea behind learning Haskell. Huge personal gains.
ZFS and BTRFS are orthogonal and often used in conjunction with Nix.
> Are templated VMs contained within a few kilobytes of confif [sic] files?
Not kilobytes, but Proxmox supports sparse images so pretty small. More importantly, disk space is cheap as hell, and I value my time way more than a couple of hundred megs of space.
> Can anything in the entire system be included or excluding by tweaking these text files?
Personally I template my images with Ansible, so yes in fact anything can be included or excluded with a text file.
> Can it be used as a desktop on bare metal?
Who cares? The performance hit from a modern Type 1 hypervisor is so small as to only matter if you're also the kind of person who is tweaking obscure CFLAGS for emerge, which is to say it doesn't matter.
> ZFS and BTRFS are orthogonal
Only in that they aren't an OS, obviously, but they perform the same function (rollback) that you mentioned as a positive point for NixOS.
I want to use it as my personal computer...using a VM seems even more fringe and niche than NixOS there lol. And for a home network, VM also seems overkill.
I suppose there are also network effects at play. If you use NixOS for a laptop and desktop, suddenly using it for home infra is actually more economical than using other tools.
I also get a sense they are for some reason solely focused on cattle server use-cases. I'd say the OP (home infra) is in between your production servers and your PC.
Conversely, I can lose a k8s node and have nothing change. If I lose my NAS (separate node, separate Proxmox cluster), I'd have to boot up the backup (which boots daily to sync, then shuts down) and run an Ansible play to change its IP address so that all the NFS targets still worked. I could make that more automated, I suppose, but it's an unlikely scenario so I'm fine with the small amount of manual labor.
I guess my point is that I don't see the benefit in having a special OS for daily use. If I want to fiddle around and possibly break things, I don't want to be doing that on the device I use daily. I used Gentoo for years in the early 2000s, and no longer have the time or patience for my main computer breaking constantly. If I want to play with something, I spin up a VM. If I want to play with something baremetal, I have an old Dell T310 I can use, and a couple of ancient Macbooks somewhere.
I literally cannot be paid to care about borking my machine. It takes ten minutes to reinstall.
For stuff that cannot conveniently be installed locally (hello multiple versions of DaVinci Resolve) or ideally want to be ephemeral (hello basically all the development environments I use), I've got Docker.
A- If you want to be able to restore to any point after installing your system: LVM/ZFS/BTRFS snapshots got you covered.
B1- If you want to install your system the way you want, you have Kickstart (RedHat family) and Preseed (Debian family). You can provide an installation template to the installers, and they install your system the way you want.
You want to get your /etc/ afterwards the installation? Either provide it on a disk, or your local network, or anywhere on the internet. Either integrate it to your Kickstart/Preseed end hooks, or do it after your first boot.
B2- If you want something more fancy? Create a FAI installation media which installs the system you want.
C- You want to transform an existing Debian system to something you want? You get the dpkg package selection state and set to the target system, apply the state so the system is converted to your own selections. Apply the /etc via git or any way you want.
D- Want something more programmatic? Run an Ansible playbook locally (This is how GitLab installs and configures itself during install).
E- For fleet installations there are XCAT and network variants of B1, but they are out of scope for personal systems.
We use E in our system room. I used B1 for personal systems and B2 to deploy an installation country-wide via USB sticks. I used C in the same project for a small subset of servers. In these cases, all systems are operational in the first boot, starting from a known state.
I know a lot of people using A, and nudging me to try/use it. GitLab uses D every time I upgrade it.
I really don't see myself using another Linux distro. It would make more sense to just modify my NixOS config. Don't know what another distro would even buy me tbh.