I’ve been meaning to upgrade my home network based on some of the lessons I’ve learned deploying NixOS on a VPS. I’ve got a few of these little ProDesk machines that I got on eBay a while back. They’re great if you want some lightweight processes running 24/7. But they were still running Ubuntu! Oof! Time for an overhaul.
1: Deploy Over Network with deploy-rs Based on my experience with a DigitalOcean VPS I knew I wanted to use the deploy-rs model on a local node. Here’s the basic idea:
...
Our starting point here is a node that is freshly infected with NixOS. For changing the system, we have 2 options.
SSH in and edit the configuration files (or copy them over) and then run nixos-rebuild switch which triggers the node to pull and build all the necessary items.
Check and build the configuration locally, and copy the entire closure across.
At a glance there might not be an advantage to one or the other. But consider if you’re deploying custom content that isn’t part of nixOS builtin configuration. To use method (1) you would need to clone all your repos on the server to be able to rebuild. Then every update requires you to ssh in and pull.
...