Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

This is the flake behind two workstations: a laptop and a desktop running the same NixOS on nixos-unstable, with LVM-on-LUKS disks, immutable users whose passwords come from sops, Hyprland with the caelestia shell, and Limine.

The user layer lives here too. dotfiles/ and nvim/ are symlinked into $HOME by home-manager, so there is no stow and no second repo to bump: a config change and the system change it needs are one commit.

The machines

MachineWhat it is
hutao-desktopRyzen 5 3600X, RX 5600 XT; the main workstation
hutao-laptopRyzen 3 7320U; the same desktop, and a third monitor
vpsits own repo; on the tailnet, and publishes this book
hutao-vmnot a machine: the desktop layer under QEMU, for testing

How they talk to each other, all over the tailnet:

FromToWhat
laptopdesktopMoonlight: the desktop streams its third monitor to the laptop
desktoplaptopdeploy-rs over Tailscale SSH
desktopvpsdeploy-rs over the VPS’s own sshd on port 2222, from the vps repo
desktop, laptop, vps, a phoneone anotherSyncthing, sharing ~/syncthing

Both deploys run from the desktop because that is where you usually sit. deploy-rs builds locally and activates remotely, so any machine on the tailnet with Nix can drive them. The desktop itself has no deploy node: it is rebuilt in place. See Rebuilding and deploying.

hutao-vm boots the same desktop layer without an install, for testing anything above the disk. See Hosts and layers.

Where to start

If you want toRead
know what every host gets, and whyHosts and layers
change a dotfileThe user layer
change a colourColours
add or rotate a secretSecrets
use the laptop as a screenThe laptop as a third monitor
ship a changeRebuilding and deploying
install a machine from nothingInstalling a machine
try a desktop change without a rebootThe VM and the install rehearsal
know why a thing is the way it isthe comment at the top of the module that does it

That last row is the real index. This book says where things are and how they fit; the reasoning lives next to the code it constrains, where it cannot rot separately from it.

Conventions

  • A gotcha has a date when it was learned the hard way, so a live constraint can be told from a superstition.
  • Diagrams are mermaid. They render here, in the Forgejo web UI, and in a pull request that changes one.