···2525- [NixOS-WSL](https://github.com/nix-community/NixOS-WSL) for Windows partition
2626- NixVM for testing, you shouldn't use it unless testing breaking changes
2727- NixIso for my portable NixOS image
2828+- NixWool is my Hetzner cloud that runs [Tangled.sh](https://tangled.org/) knot
2829## Modular
2930I adopted [Dendritic layout](https://github.com/mightyiam/dendritic) for my config.
3031Making all files their own modules that I can import, and if module isn't imported, it doesn't exist. This way most of my config is fairy atomic and you can pop in and out modules as you wish.
···11+# installation script for Hetzner VPS, I just loaded a standart nix iso in there
22+# Stolen from @Jet https://github.com/Michael-C-Buckley/nixos/blob/master/modules/hosts/o1/tools/format.sh
33+44+#!/usr/bin/env bash
55+set -euo pipefail
66+77+# ZFS Install Script for O1 (Oracle ARM instance)
88+99+ZFS_OPTS="-o ashift=12 \
1010+ -O compression=zstd \
1111+ -O atime=off \
1212+ -O xattr=sa \
1313+ -O acltype=posixacl \
1414+ -O dnodesize=auto \
1515+ -O normalization=formD \
1616+ -O mountpoint=none"
1717+1818+hostname="NixWool"
1919+2020+read -rp "This will erase the drives, as you sure? [y/N]" confirm
2121+if [[ $confirm =~ ^[Yy]$ ]]; then
2222+ echo "Proceeding..."
2323+else
2424+ echo "Aborted."
2525+ exit 1
2626+fi
2727+2828+echo "Wiping drives..."
2929+# Wipe the NVMe
3030+wipefs -a /dev/sda
3131+sgdisk --zap-all /dev/sda
3232+3333+echo "Formatting drives..."
3434+# Put boot on the NVMe then fill the rest with ZFS
3535+sgdisk -n1:1M:+512M -t1:EF00 -c1:"EFI System" /dev/sda
3636+sgdisk -n2:0:+4G -t2:8200 -c2:"Linux Swap" /dev/sda
3737+sgdisk -n3:0:0 -t3:BF01 -c3:"ZROOT" /dev/sda
3838+3939+# Format the boot partition
4040+mkfs.vfat -F32 /dev/sda1
4141+4242+# Create the pool on the drive, use reasonable settings
4343+echo "Creating zroot..."
4444+zpool create -f $ZFS_OPTS zroot /dev/sda3
4545+4646+# Mount the drives and prepare for the install
4747+mkdir -p /mnt
4848+mkdir -p /mnt/{cache,nix,persist,tmp,boot}
4949+mount /dev/sda1 /mnt/boot
5050+5151+# This create the zvols used in this cluster
5252+zfs create -o mountpoint=none zroot
5353+for zvol in "tmp" "nix" "cache" "persist"; do
5454+ zfs create -o mountpoint=legacy zroot/$zvol
5555+ mount -t zfs zroot/$zvol /mnt/$zvol
5656+done