I've gone full Nix: Proxmox to NixOS + Incus
Why I replaced my clickable hypervisor with declarative text files
Iโve gone full Nix: Proxmox to NixOS + Incus
I have officially decommissioned my Proxmox cluster. After years of running my homelab on Proxmox, starting with a single NUC and expanding to a multi-node cluster, I have migrated everything to NixOS running Incus.
Update 2026-06-26: This post reached the front page of Hacker News, and several readers correctly pointed out that Proxmox is not limited to clicking around in the web UI. It has
qm,pct, config files, a REST API, Terraform providers, and Ansible workflows. My point is not that Proxmox cannot be automated. Even with that automation, state drift can still creep in when debugging means running one quick command, especially if an agent is allowed to execute imperative fixes that never make it back into the automation framework. It is that, for my setup, I wanted the reproducible configuration itself to be the source of truth. The thing I care about is not buttons versus commands, but whether I can rebuild the host from version-controlled text files and know that every important change is captured there.
From Skeptic to Believer #
I wasnโt always a Nix evangelist. In fact, I initially despised the language and its syntax. I couldnโt figure out how it worked, and I already had my own specific way of setting up my dotfiles. I used Dotbot for symlinking and a tool I wrote called dotbins for managing binaries. I didnโt feel like I required Nix for most of my tools. I used nix-darwin on my Mac for a long time, but only to specify Homebrew packages and application settings.
My true conversion happened when I bought my gaming PC, as described in my local LLM post. I initially installed Pop!_OS because I wanted to play games and absolutely wanted to avoid Windows. I got some games to work, but I constantly ran into NVIDIA driver issues that required running random, imperative commands to fix. I felt that was a bad solution because I could never reproduce those debugging steps later. Then I did the dumb thing of updating my NVIDIA drivers, not realizing that imperatively managing driver versions and repositories is a recipe for disaster, and got stuck in a GRUB boot loop. Frustrated, I installed NixOS, hoping its promise of atomic updates would solve this. The result was glorious. I never really believed that everything would be byte-for-byte equivalent until I migrated that system to a new disk. I didnโt clone the drive; I just applied my Nix configuration to a fresh install. It booted, I copied my data, and everything was identical. That was the moment it clicked.
The Friction of Imperative Systems #
Proxmox is fantastic software. It lowered the barrier to entry for me and taught me almost everything I know about virtualization, LXC containers, and ZFS. But fundamentally, Proxmox is built around clicking buttons. It is a GUI-first paradigm. While you can automate it with Terraform or Ansible, it often feels like fighting the tool. State drift is real. You change a setting in the UI to debug something, forget about it, and six months later your โinfrastructure as codeโ is out of sync with reality. For a human maintaining a system manually, this is annoying. But when you introduce AI agents, this becomes a disaster for the operator. An agent running in โYOLO modeโ might execute hundreds of imperative commands to fix a problem. It might succeed, but it leaves your system in an undefined, unreproducible state that no oneโnot even the agentโcan fully understand or replicate later.
This friction manifests in hardware management too.
On my HP EliteDesk, the Intel I219-LM network card has a known bug where it hangs with hardware offloading enabled.
I vaguely remembered fixing this years ago on Proxmox, but I had forgotten the details.
When I set up NixOS, I ran into the same issue: the network would randomly drop.
This time, however, the fix isnโt a forgotten command run in a root shell history.
It is a documented systemd service in my configuration.
I added a comment explaining exactly why tso off gso off is needed, citing the forum threads.
If I ever reinstall this machine, the fix applies automatically.
On Proxmox, I would have had to rediscover this pain all over again.
Another example is my Intel NUC.
Since my homelab lives behind my TV, I wondered if I could also use it as a Home Theater PC (HTPC).
On Proxmox, this would have required passing the GPU through to a VM to get video output.
But doing so would mean the Proxmox host loses access to the GPU entirely, meaning no local console if things go wrong.
It was a strict trade-off: either a media player, or a debuggable hypervisor. I tried it, but it was so much trouble that I quickly reverted.
With NixOS, I donโt have to choose.
The host OS runs Kodi directly, giving me native hardware acceleration and video output.
Simultaneously, incus runs in the background, hosting my containers.
I get my HTPC and my server on the same metal, without the virtualization tax or the โheadless hostโ limitation.
There is a deeper philosophical difference too. Systems like Proxmox or TrueNAS are designed as appliances. You arenโt supposed to run arbitrary commands on the host; installing packages or tweaking config files is discouraged because you might break the middleware or lose changes on upgrade. You are effectively locked out of your own hardwareโs full potential. With NixOS, the host is fully mine. I can mess with itโinstalling Kodi, tweaking network drivers, running local LLMsโwithout fear. Because the state is declarative, it is 100% obvious and reproducible. I can break the host configuration and recover to a working state in seconds, even if the machine is running essential services.
The Agentic Multiplier #
I have written before about my shift towards agentic coding. In a world where AI agents execute tasks, CLI-first and declarative systems are king. An AI agent cannot reliably โclick buttonsโ in a web interface to configure a VLAN tag or resize a disk. It needs text. It needs determinism.
By moving to NixOS, my entire infrastructure is defined in text files.
This means my AI agents can read, understand, and even safely modify my infrastructure.
Proxmoxโs opaque database and UI-driven workflow were a black box to my agents.
NixOS is an open book.
If I want my agent to โdeploy a Faster Whisper API server on port 9000 and expose it to the LANโ, it doesnโt need to navigate a โServicesโ menu, then a โNetworkโ menu, and then a โFirewallโ menu.
It just writes a systemd service definition and adds networking.firewall.allowedTCPPorts = [ 9000 ]; in the same file.
The agent can even verify the change was successful by checking the git diff or the active configuration.
This is the infrastructure counterpart to the โagentic codingโ revolution Iโm living in.
A friend who has used NixOS for many years recently complimented me on how nicely my configuration was structured, especially for managing 8 different machines. The funny thing is, I havenโt written almost a single line of my configuration myself. I did all of it using agentic AI over many sessions. I have restructured and refactored it quite a few times, going from a single machine to 2 machines, and eventually to 9. The AI handles the heavy lifting of refactoring, ensuring that my PC, NUC, and HP all share common modules while keeping their unique personalities.
The Architecture: Incus & Simulation #
I still wish there was a purely โNixโ way to manage persistent, stateful LXC containers and VMs.
There are projects like nixos-containers or microvm.nix, but they often lack the operational maturity or live-migration features of a robust hypervisor.
Incus (the community fork of LXD) fills this gap perfectly.
It gives me the โcattleโ management of NixOS for the host, while allowing me to run โpetโ legacy workloads (like my old Ubuntu containers or Home Assistant VM) in a stable, manageable environment.
Crucially, Incus is entirely controllable via a clean CLI, making it a perfect citizen in my agentic workflow.
Over time, I had already migrated most of my legacy LXC containersโservices like DNS or media managersโto declarative Docker Compose files running inside VMs. But I still had one major holdout: Home Assistant OS. I didnโt have a good alternative for it. I assumed I needed a dedicated appliance OS like Proxmox to run it reliably. I didnโt realize that with Incus on NixOS, running a full VM for Home Assistant is trivial. Itโs just another QEMU process, but managed with the same ease as a container.
One neat thing I did was create Incus VMs that replicate the exact same configuration as my physical machines. Before I actually switched off my last Proxmox host, I was already confident that the full configuration worked because I had a virtual machine running the same setup. I just have a small file with overrides. Then I could validate that the virtual machine worked. This removed the fear of โnuking and pavingโ my physical servers.
The Migration #
Migrating was surprisingly straightforward, thanks to vzdump and qemu-img.
Here is how I moved my 7+ years of digital history without losing data.
I also kept some detailed migration notes in my dotfiles. These notes should be sufficient for anyone trying to do the same. And if not, giving them to an AI (I used Gemini 3 Pro) will certainly allow you to figure it out.
1. Migrating LXC Containers #
For my LXC containers (running Docker, DNS, etc.), I essentially โteleportedโ them. I dumped the running container on Proxmox to a standardized tarball, copied it over, and streamed it directly into a fresh Incus container.
On Proxmox:
# Dump container 101 to a compressed archive
vzdump 101 --dumpdir /var/lib/vz/dump --mode suspend --compress zstd
On NixOS (using my migrate-lxc.sh script):
# Stream the backup into a new Incus container
./migrate-lxc.sh vzdump-lxc-101-*.tar.zst ubuntu-container
This script creates a fresh container, mounts its root filesystem, and overwrites it with the Proxmox dump.
It handles the messy partsโlike mapping UIDs and fixing machine-idโautomatically.
2. Migrating Virtual Machines #
For VMs (like Home Assistant OS), it was a matter of converting the disk format. Proxmox uses LVM-thin or ZFS zvols; Incus is happy with QCOW2 or raw ZFS.
On Proxmox:
# Export the ZFS volume to a QCOW2 file
qemu-img convert -p -O qcow2 /dev/zvol/rpool/data/vm-100-disk-0 vm-100.qcow2
On NixOS (using migrate-vm.sh):
# Import the disk and create the VM
./migrate-vm.sh vm-100.qcow2 home-assistant
The Result #
I now manage my entire fleetโHost OS, networking, storage, and hypervisor configurationโfrom a single git repository. I get the best of both worlds: persistent, stateful services where I need them, and a reproducible, bulletproof host operating system. I can wipe my host machine, reinstall NixOS, run a restore script, and be back online in minutes. Best of all, I never have to remember which checkbox I clicked in a web UI three years ago. It is all in the code. And because it is code, my agents can help me manage it.
References & Configuration #
All configuration files mentioned in this post are available in my dotfiles repository.
- flake.nix: The entry point defining my entire fleet (PC, NUC, HP).
- networking.nix: The declarative fix for the Intel I219-LM network hang.
- kodi.nix: NUC HTPC configuration running Kodi directly on the host.
- ai.nix: Declarative service definition for Faster Whisper.
- incus-overrides.nix: Overrides used to simulate physical machines inside Incus VMs.
- migrate-lxc.sh: Script to import Proxmox
vzdumparchives into Incus containers. - migrate-vm.sh: Script to import QCOW2 disk images into Incus VMs.
- PROXMOX_MIGRATION.md: Detailed raw notes and inventory of the migration.