Get the latest tech news

How I like to install NixOS (declaratively)


For one of my network storage PC builds, I was looking for an alternative to Flatcar Container Linux and tried out NixOS again (after an almost 10 year break). There are many ways to install NixOS, and in this article I will outline how I like to install NixOS on physical hardware or virtual machines: over the network and fully declaratively.

When I originally set up my current network storage build, I chose CoreOS (later Flatcar Container Linux) because it was an auto-updating base system with a declarative cloud-init config. I like to compare flakes to version lock file in other programming environments: the idea is that building the system in 5 months will yield the same result as it does today. Note that not all changes are fully applied as part of nixos-rebuild switch: while systemd services are generally restarted, newly required kernel modules are not automatically loaded (e.g. after enabling the edgetpu coral hardware accelerator in Frigate).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of NixOS

NixOS

Related news:

News photo

You do not need NixOS on the desktop

News photo

NixOS and reproducible builds could have detected the xz backdoor

News photo

Is NixOS truly reproducible?