Rite of Resurrection — RogueLeader
Complete guide to resurrect the RogueLeader home-shrine.
Reference Information
Section titled “Reference Information”| Parameter | Value |
|---|---|
| Local network | 192.168.0.10 (alias rogueleader.home) |
| Disk | /dev/sda (BIOS/GPT via disko) |
| Architecture | x86_64, Intel KVM |
| SSH | Directly accessible (public key only, no Tailscale) |
| sops | Age key derived from /etc/ssh/ssh_host_ed25519_key |
Prerequisites
Section titled “Prerequisites”- Physical or console access to the server
- NixOS ISO USB ready
- Local network connectivity (DHCP)
- exampleHost age key available (for re-encrypting secrets after install) See Reliquary Backup & Restoration
- Recent Borg backup verified:
BORG_PASSPHRASE=... borg list ssh://backup@storage2.friloux.me/~/rogueleader.friloux.me
Partitioning Summary (disko)
Section titled “Partitioning Summary (disko)”Single disk /dev/sda, GPT:
| Partition | Size | Role |
|---|---|---|
| part1 | 1 MB | GRUB BIOS boot |
| part2 | 4 GB | swap |
| part3 | remainder | / ext4 |
Unlike clochette, disko manages the NixOS fileSystems — no manual UUID updates needed after reinstall.
Step 1 — Boot on NixOS ISO
Section titled “Step 1 — Boot on NixOS ISO”Plug in USB, boot from NixOS ISO.
Verify network connectivity (DHCP LAN):
ip addr showping -c3 192.168.0.1Step 2 — Fetch Repository
Section titled “Step 2 — Fetch Repository”git clone https://github.com/gfriloux/nixos /tmp/nixoscd /tmp/nixosStep 3 — Disk Partitioning with disko
Section titled “Step 3 — Disk Partitioning with disko”sudo nix run github:nix-community/disko/latest -- \ --mode destroy,format,mount \ --flake /tmp/nixos#RogueLeaderdisko partitions /dev/sda, formats as ext4, and mounts everything under /mnt.
Verify:
df -h /mntmount | grep /mntStep 4 — NixOS Installation
Section titled “Step 4 — NixOS Installation”sudo nixos-install --flake /tmp/nixos#RogueLeader --no-root-passwdStep 5 — First Boot
Section titled “Step 5 — First Boot”rebootRemove the USB. System boots into GRUB → NixOS.
SSH is directly accessible from the local network via the public key declared in users.nix:
# From exampleHostssh guillaume@rogueleader.homeStep 6 — Update Age Key in sops
Section titled “Step 6 — Update Age Key in sops”The new install generated a new SSH host key → new age key. Without this update, sops cannot decrypt secrets from RogueLeader.
From RogueLeader (connected via SSH):
nix run nixpkgs#ssh-to-age -- -i /etc/ssh/ssh_host_ed25519_key.pubFrom exampleHost, update .sops.yaml with the new public key:
cd ~/Apps/github/gfriloux/nixosnano .sops.yaml# Replace &server_rogueleader value with the new age keyRe-encrypt secrets/RogueLeader.yaml:
sops updatekeys secrets/RogueLeader.yaml# Confirm with 'y'
# Verifysops -d secrets/RogueLeader.yamlCommit and push:
git add .sops.yaml secrets/RogueLeader.yamlgit commit -m "chore(secrets): rotate RogueLeader age key after reinstall"git pushStep 7 — Full Deployment from exampleHost
Section titled “Step 7 — Full Deployment from exampleHost”just install_rogueleader --ask-sudo-passwordThis deploys the complete configuration with secrets now decryptable by the new SSH host key.
To deploy Home Manager:
just home_rogueleaderStep 8 — Data Restoration from Borg (if needed)
Section titled “Step 8 — Data Restoration from Borg (if needed)”# From RogueLeader as rootsudo -i
# List archivesBORG_PASSPHRASE=$(cat /run/secrets/services/borg/passphrase) \BORG_RSH="ssh -i /run/secrets/services/borg/key/private" \borg list ssh://backup@storage2.friloux.me/~/rogueleader.friloux.me
# Stop daemonssystemctl stop docker-papra docker-uptime-kuma docker-mealie docker-borg-ui \ docker-wow-cp-bookstack docker-wow-cp-mariadb docker-wow-cp-mysqldump
# Restore from /cd /BORG_PASSPHRASE=$(cat /run/secrets/services/borg/passphrase) \BORG_RSH="ssh -i /run/secrets/services/borg/key/private" \borg extract --progress \ ssh://backup@storage2.friloux.me/~/rogueleader.friloux.me::ARCHIVE_NAME
# Restart servicessystemctl start docker-papra docker-uptime-kuma docker-mealie docker-borg-ui \ docker-wow-cp-bookstack docker-wow-cp-mariadb docker-wow-cp-mysqldumpStep 9 — Final Verification
Section titled “Step 9 — Final Verification”# Daemons are runningdocker ps --format "table {{.Names}}\t{{.Status}}"
# Secrets decryptedls /run/secrets/
# Borg backupsystemctl status borgbackup-job-remote