···22# Stolen from @Jet https://github.com/Michael-C-Buckley/nixos/blob/master/modules/hosts/o1/tools/format.sh
3344# find a way to put keys for secrets into respective directories yourself
55+# My way is to `sudo passwd` a new root password and `ssh root@ip` into the vps
66+# Then just `scp ./keys.txt root@ip:/root`
5768#!/usr/bin/env bash
79set -euo pipefail
···32343335echo "Formatting drives..."
3436# Put boot on the NVMe then fill the rest with ZFS
3535-sgdisk -n1:1M:+512M -t1:EF00 -c1:"EFI System" /dev/sda
3737+sgdisk -n1:1M:+512M -t1:EF00 -c1:"NIXBOOT" /dev/sda
3638sgdisk -n2:0:+4G -t2:8200 -c2:"Linux Swap" /dev/sda
3739sgdisk -n3:0:0 -t3:BF01 -c3:"ZROOT" /dev/sda
3840···5759 zfs create -o mountpoint=legacy zroot/$zvol
5860 mount -t zfs zroot/$zvol /mnt/$zvol
5961done
6262+6363+mkdir -p /mnt/persist/home/ladas552/.ssh
6464+mkdir -p /mnt/persist/home/ladas552/.config/sops/age
6565+cp ./NixToks /mnt/persist/home/ladas552/.ssh/
6666+cp ./keys.txt /mnt/persist/home/ladas552/.config/sops/age/
60676168nixos-install --no-root-password --flake "github:Ladas552/Flake-Ocean#NixWool"
6269