···25- [NixOS-WSL](https://github.com/nix-community/NixOS-WSL) for Windows partition
26- NixVM for testing, you shouldn't use it unless testing breaking changes
27- NixIso for my portable NixOS image
028## Modular
29I adopted [Dendritic layout](https://github.com/mightyiam/dendritic) for my config.
30Making 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.
···25- [NixOS-WSL](https://github.com/nix-community/NixOS-WSL) for Windows partition
26- NixVM for testing, you shouldn't use it unless testing breaking changes
27- NixIso for my portable NixOS image
28+- NixWool is my Hetzner cloud that runs [Tangled.sh](https://tangled.org/) knot
29## Modular
30I adopted [Dendritic layout](https://github.com/mightyiam/dendritic) for my config.
31Making 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.
···1+# installation script for Hetzner VPS, I just loaded a standart nix iso in there
2+# Stolen from @Jet https://github.com/Michael-C-Buckley/nixos/blob/master/modules/hosts/o1/tools/format.sh
3+4+#!/usr/bin/env bash
5+set -euo pipefail
6+7+# ZFS Install Script for O1 (Oracle ARM instance)
8+9+ZFS_OPTS="-o ashift=12 \
10+ -O compression=zstd \
11+ -O atime=off \
12+ -O xattr=sa \
13+ -O acltype=posixacl \
14+ -O dnodesize=auto \
15+ -O normalization=formD \
16+ -O mountpoint=none"
17+18+hostname="NixWool"
19+20+read -rp "This will erase the drives, as you sure? [y/N]" confirm
21+if [[ $confirm =~ ^[Yy]$ ]]; then
22+ echo "Proceeding..."
23+else
24+ echo "Aborted."
25+ exit 1
26+fi
27+28+echo "Wiping drives..."
29+# Wipe the NVMe
30+wipefs -a /dev/sda
31+sgdisk --zap-all /dev/sda
32+33+echo "Formatting drives..."
34+# Put boot on the NVMe then fill the rest with ZFS
35+sgdisk -n1:1M:+512M -t1:EF00 -c1:"EFI System" /dev/sda
36+sgdisk -n2:0:+4G -t2:8200 -c2:"Linux Swap" /dev/sda
37+sgdisk -n3:0:0 -t3:BF01 -c3:"ZROOT" /dev/sda
38+39+# Format the boot partition
40+mkfs.vfat -F32 /dev/sda1
41+42+# Create the pool on the drive, use reasonable settings
43+echo "Creating zroot..."
44+zpool create -f $ZFS_OPTS zroot /dev/sda3
45+46+# Mount the drives and prepare for the install
47+mkdir -p /mnt
48+mkdir -p /mnt/{cache,nix,persist,tmp,boot}
49+mount /dev/sda1 /mnt/boot
50+51+# This create the zvols used in this cluster
52+zfs create -o mountpoint=none zroot
53+for zvol in "tmp" "nix" "cache" "persist"; do
54+ zfs create -o mountpoint=legacy zroot/$zvol
55+ mount -t zfs zroot/$zvol /mnt/$zvol
56+done