Nixos on my home server

planning to develop nixos on my home server currently it is running arch linux Any suggestion on it !

Thanks.

Biggest advice:

Store your system configuration in a git repository. That way you can port your changes to other systems, roll back your configuration, and get a persistent history of how it is configured.

You’ll need to mentally think about NixOS in a different way than non-declarative distributions like arch linux. Instead of editing configuration files directly in /etc/ and installing software, for most things you’ll edit your nix configuration and rebuild your system.

Expect most help online for other distributions, which may ask you to install a package with a command line tool or edit a config file, to need adaptation to the NixOS model. NixOS isn’t FHS compliant, and many paths expected by scripts simply won’t exist. (ie any script with #!/bin/bash shebang will need editing).

The benefit for NixOS for me really comes with replicating the same configuration across multiple machines. I like having my laptop and desktop run the same configuration, and the ability to organize all my system state in one place. There’s heartache with NixOS like every distro, and it’s not perfect. Sometimes I miss the (relative) easiness of arch linux or debian based distros. But at this point, nixos feels better to me than everything else.

If you are OCD and pedantic about having all of your systems being configured the exact same way, being reproducible, and easy to manage, NixOS is perfect for you! I have 4 nix systems all centrally managed, including two laptops, a desktop, and my home router.

1 Like

To be clear, nix language configuration is an extra abstraction. So you will still need to know the software - read their docs, understand their config, especially systemd services - but you will just write that config in nix rather than yaml/toml/json/… Though NixOS has an official wiki at NixOS Wiki - Official NixOS Wiki, you’ll probably still need to use the Arch Wiki (or similar) when you run into problems/questions about specific software.

You also don’t need to configure multiple systems identically, in fact just about every system will have differences - it’s more about the clearer visibility into exactly what was configured IMO. You can realize this benefit even with only 1 system.

For home server use, I personally find it nice that I can apply some networking configuration or systemd hardening across multiple services simultaneously and be sure that I didn’t miss anything.

3 Likes