Skip to content

Rite of Resurrection — RogueLeader

Complete guide to resurrect the RogueLeader home-shrine.

ParameterValue
Local network192.168.0.10 (alias rogueleader.home)
Disk/dev/sda (BIOS/GPT via disko)
Architecturex86_64, Intel KVM
SSHDirectly accessible (public key only, no Tailscale)
sopsAge key derived from /etc/ssh/ssh_host_ed25519_key
  • 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

Single disk /dev/sda, GPT:

PartitionSizeRole
part11 MBGRUB BIOS boot
part24 GBswap
part3remainder/ ext4

Unlike clochette, disko manages the NixOS fileSystems — no manual UUID updates needed after reinstall.

Plug in USB, boot from NixOS ISO.

Verify network connectivity (DHCP LAN):

Terminal window
ip addr show
ping -c3 192.168.0.1
Terminal window
git clone https://github.com/gfriloux/nixos /tmp/nixos
cd /tmp/nixos
Terminal window
sudo nix run github:nix-community/disko/latest -- \
--mode destroy,format,mount \
--flake /tmp/nixos#RogueLeader

disko partitions /dev/sda, formats as ext4, and mounts everything under /mnt.

Verify:

Terminal window
df -h /mnt
mount | grep /mnt
Terminal window
sudo nixos-install --flake /tmp/nixos#RogueLeader --no-root-passwd
Terminal window
reboot

Remove the USB. System boots into GRUB → NixOS.

SSH is directly accessible from the local network via the public key declared in users.nix:

Terminal window
# From exampleHost
ssh guillaume@rogueleader.home

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):

Terminal window
nix run nixpkgs#ssh-to-age -- -i /etc/ssh/ssh_host_ed25519_key.pub

From exampleHost, update .sops.yaml with the new public key:

Terminal window
cd ~/Apps/github/gfriloux/nixos
nano .sops.yaml
# Replace &server_rogueleader value with the new age key

Re-encrypt secrets/RogueLeader.yaml:

Terminal window
sops updatekeys secrets/RogueLeader.yaml
# Confirm with 'y'
# Verify
sops -d secrets/RogueLeader.yaml

Commit and push:

Terminal window
git add .sops.yaml secrets/RogueLeader.yaml
git commit -m "chore(secrets): rotate RogueLeader age key after reinstall"
git push

Step 7 — Full Deployment from exampleHost

Section titled “Step 7 — Full Deployment from exampleHost”
Terminal window
just install_rogueleader --ask-sudo-password

This deploys the complete configuration with secrets now decryptable by the new SSH host key.

To deploy Home Manager:

Terminal window
just home_rogueleader

Step 8 — Data Restoration from Borg (if needed)

Section titled “Step 8 — Data Restoration from Borg (if needed)”
Terminal window
# From RogueLeader as root
sudo -i
# List archives
BORG_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 daemons
systemctl 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 services
systemctl start docker-papra docker-uptime-kuma docker-mealie docker-borg-ui \
docker-wow-cp-bookstack docker-wow-cp-mariadb docker-wow-cp-mysqldump
Terminal window
# Daemons are running
docker ps --format "table {{.Names}}\t{{.Status}}"
# Secrets decrypted
ls /run/secrets/
# Borg backup
systemctl status borgbackup-job-remote