From Nix Shells to a Private Home Cloud


I started using Nix because Haskell development environments were difficult to reproduce.

Seven years later, one flake describes my desktops, laptops, server, Steam Deck, Raspberry Pis, virtual machines, user environment and Darwin machine. An OpenWrt router and Tailscale extend the same private DNS namespace to me wherever I am.

The result is not a public cloud. It is my home network following me around.

It started with Haskell

My first Nix notes, from 2019, were about reproducible Haskell development. I wanted a project to specify its compiler, libraries and tools instead of relying on whatever happened to be installed on a machine.

That sounds obvious until a Haskell project needs a particular GHC, native libraries, editor integration and a build environment shared between Linux and macOS. Nix offered a way to make those dependencies part of the project rather than part of workstation folklore.

By early 2022, Nix was no longer only a development tool. I was editing /etc/nixos/configuration.nix and running:

nixos-rebuild switch

An Acer Chromebook with community UEFI firmware became one of the early experiments. NixOS could turn a locked-down appliance into an ordinary Linux computer, although getting its networking and boot path right was its own project.

The first server

In July 2022 I created nixos-config for a headless server.

The initial configuration already contained most of the ideas which survived:

The machine accumulated my gym tracker, YouTube dashboard, shopping list and other small applications. NixOS changed how I thought about operating them.

A service was no longer a sequence of commands I had once typed. Its package, user, database dependency, environment, systemd unit and secret paths could be one reviewed configuration.

Not everything became declarative. PostgreSQL still had mutable data. Accounts still existed inside applications. Power loss could still corrupt a Nix store. NixOS made the intended machine easier to reconstruct; it did not make operational state disappear.

Flakes, eventually

The server enabled the experimental flake commands from the beginning, but the actual system remained a large configuration.nix rebuilt through NIXOS_CONFIG.

The first top-level flake arrived in June 2025. That did not instantly solve composition. Applications still lived in nested sources and path imports could ignore dirty local changes, which is an alarming property in a deployment workflow.

In 2026 I converted the applications into real flake inputs and removed the remaining nested submodules.

This is representative of my Nix journey. I rarely moved from “old way” to “new way” in one clean rewrite. I enabled a mechanism, used it where it helped, discovered what still leaked, and only later allowed it to reorganize the whole system.

NixOS becomes my desktop

In February 2025 I began planning a new desktop. The checklist was not a minimalist Linux installation:

This became zuffie-nixos in July. The first version was deliberately simple: a pinned Nixpkgs, one host and one large configuration.

Within weeks it was my primary desktop. It also became the place where I packaged missing tools, carried local patches and made awkward hardware combinations reproducible.

Home Manager entered gradually too. I wanted Nix to define which dotfiles existed and how machines composed them, but I did not want to rebuild the world after every Neovim edit. The eventual compromise used impurity.nix for intentional impure symlinks on live-edited configuration while retaining declarative ownership around them.

One repository, several kinds of computer

The configuration spread to more machines: an Intel MacBook, another NVIDIA system, an Apple Silicon nix-darwin host and a Steam Deck with a reproducible installer. In October 2026, Raspberry Pis and the old Acer Chromebook joined the flake too, followed by Apple Silicon Macs running NixOS directly: a MacBook Neo in October 2026, then an M4 and an M5 MacBook Air in November, running kernels from the Aurora project.

Copying a large host configuration stopped scaling. In February 2026 I split the repository into small host definitions and reusable roles:

common
desktop
workstation
laptop
server
cuda
hardware-specific modules

Hosts selected capabilities instead of inheriting copied blocks. Hardware and boot details remained local to the machine. Formatting, deadnix, statix, treefmt and pre-push checks made the personal infrastructure behave more like a maintained software project.

In March, the old 2022 server finally moved into zuffie-nixos and nixos-config was retired.

The old server kept system.stateVersion = "21.11". Unifying the configuration did not mean pretending a stateful four-year-old machine was a fresh installation. It meant preserving its compatibility boundary while expressing it through the same module system as everything else.

The router joins the system

NixOS made services reproducible, but they were still mostly available only at home.

In June 2025 I replaced the Xiaomi AX3200 firmware with OpenWrt. The router took over stable DHCP reservations and private DNS through dnsmasq.

In August I installed Tailscale on the router and advertised the home subnet. That was the important architectural change.

Instead of publishing each service individually or installing Tailscale inside every appliance, an enrolled remote device could route to the ordinary home LAN through OpenWrt. The router also answered DNS requests from the tailnet through split DNS.

The result was:

remote laptop or phone
        |
        | encrypted Tailscale connection
        v
OpenWrt subnet router and private DNS
        |
        +-- NixOS server applications
        +-- media workstation
        +-- devices which know nothing about Tailscale

The same private service name worked on the sofa and away from home. The service did not need a public DNS record or an internet-facing port.

Naming is part of access

Merely installing Tailscale did not produce that outcome.

The subnet route needed approval. OpenWrt needed forwarding between its Tailscale and LAN zones. DNS had to accept requests from that interface. Clients had to accept advertised routes and split-DNS configuration. One laptop needed explicit client-routing support before the whole path worked.

This taught me that remote access is an end-to-end property. A green “connected” indicator on both ends says little about route approval, firewall policy, name resolution or client trust.

Private DNS was as important as packet reachability. Before it, dashboards tended to become bookmarks containing hostnames and port numbers. After it, the network had a stable vocabulary.

Private HTTPS

Some local applications need HTTPS even on a private network. Web Bluetooth, for example, requires a secure browser context. Authentication cookies and browser APIs also behave better when an internal service is not treated as an insecure exception.

I maintain a local certificate authority. Its root certificate is installed on trusted clients, while per-service certificates and keys are encrypted with age and consumed by Nginx or the relevant service module. Changes trigger the necessary service restart.

This preserves the private architecture:

Installing the CA on a hardened Android phone remains a deliberate manual step. That inconvenience is part of the trust model rather than something hidden by a public certificate service.

What runs there

The old headless server now declaratively runs PostgreSQL, several personal web applications, Forgejo and an Actions runner, Phorge, MQTT, Nginx and a locally hosted label-printer frontend.

The workstation runs Jellyfin with GPU acceleration, Calibre Content Server, Audiobookshelf, media-processing jobs and isolated virtual machines.

Some application backups are written into a synchronized Dropbox tree. The Calibre library also lives there. Media lives on ZFS. VM disks and application databases remain mutable state with varying levels of protection.

This is not a complete disaster-recovery story. Dropbox synchronization is not immutable backup, and several services still lack an encoded full recovery path. The useful distinction is that these gaps are now visible as gaps in the architecture rather than assumptions scattered across machines.

Reproducible virtual machines need identity

In 2026 I added NixOS virtual machines for isolated agent workloads. They were ordinary flake outputs using the same role system and agenix secrets as physical hosts.

Recreating one exposed a subtle failure. Its SSH host key was also its agenix identity. When identity lived inside the replaceable disk, rebuilding the VM changed the key, broke secret decryption and invalidated host-key verification for jobs copying data out.

The eventual design keeps both the stable SSH identity and the service state outside the disposable .qcow2 root disk, materializing the host-managed encrypted identity into a fresh guest on first boot. The root disk can be deleted and recreated without the machine becoming a different machine.

That distinction between configuration, mutable data and identity is one of the things NixOS made me confront explicitly.

The private cloud is the network

zuffie-nixos is not complete and will never be complete. Its recent changes are mostly about the Apple Silicon laptops: pinned kernels, boot-chain handling and hardware workarounds.

One repository now describes machines with very different histories and jobs. OpenWrt gives them stable local addressing and naming. Tailscale carries that private network to my remote devices. The local CA extends trust without making the services public. NixOS defines how the services and hosts should be rebuilt.

I began with the question “how do I reproduce this Haskell environment?”

The same idea expanded until it described most of my personal computing environment. The applications are self-hosted, but their useful boundary is no longer the house. Wherever Tailscale connects, the home network is there.