···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.
···38393940Also, I have [Norg document](./nix.norg), containing notes and TODO for the config
40414141-I also write some [blog posts about Nix](https://ladas552.me/Flake-Ocean/), feel free to check it out
4242+I also write some [blog posts about Nix](https://nix.ladas552.me/), feel free to check it out
42434344## Nvfetcher
4445···54555556I also use nvfetcher to fetch nixos modules, the method described in the `flake.nix` file.
56575757-[Check out a blog post about it](https://ladas552.me/Flake-Ocean/posts/Nvfetcher/)
5858+[Check out a blog post about it](https://nix.ladas552.me/posts/Nvfetcher/)
58595960## Screenshot if you care
6060-
6161+
61626263## Name
6364
···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+# 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`
77+88+#!/usr/bin/env bash
99+set -euo pipefail
1010+1111+ZFS_OPTS="-o ashift=12 \
1212+ -O compression=zstd \
1313+ -O atime=off \
1414+ -O xattr=sa \
1515+ -O acltype=posixacl \
1616+ -O dnodesize=auto \
1717+ -O normalization=formD \
1818+ -O mountpoint=none"
1919+2020+hostname="NixWool"
2121+2222+read -rp "This will erase the drives, as you sure? [y/N]" confirm
2323+if [[ $confirm =~ ^[Yy]$ ]]; then
2424+ echo "Proceeding..."
2525+else
2626+ echo "Aborted."
2727+ exit 1
2828+fi
2929+3030+echo "Wiping drives..."
3131+# Wipe the NVMe
3232+wipefs -a /dev/sda
3333+sgdisk --zap-all /dev/sda
3434+3535+echo "Formatting drives..."
3636+# Put boot on the NVMe then fill the rest with ZFS
3737+sgdisk -n1:1M:+512M -t1:EF00 -c1:"NIXBOOT" /dev/sda
3838+sgdisk -n2:0:+4G -t2:8200 -c2:"Linux Swap" /dev/sda
3939+sgdisk -n3:0:0 -t3:BF01 -c3:"ZROOT" /dev/sda
4040+4141+# Format the boot partition
4242+mkfs.vfat -n NIXBOOT -F32 /dev/sda1
4343+4444+# Swap
4545+mkswap -L SWAP /dev/sda2
4646+swapon /dev/sda2
4747+4848+# Create the pool on the drive, use reasonable settings
4949+echo "Creating zroot..."
5050+zpool create -f $ZFS_OPTS zroot /dev/sda3
5151+5252+# Mount the drives and prepare for the install
5353+mkdir -p /mnt
5454+mkdir -p /mnt/{cache,nix,persist,tmp,boot}
5555+mount /dev/sda1 /mnt/boot
5656+5757+# This create the zvols used in this cluster
5858+for zvol in "tmp" "nix" "cache" "persist"; do
5959+ zfs create -o mountpoint=legacy zroot/$zvol
6060+ mount -t zfs zroot/$zvol /mnt/$zvol
6161+done
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/
6767+6868+nixos-install --no-root-password --flake "github:Ladas552/Flake-Ocean#NixWool"
6969+
···1111 # snes9x-gtk
1212 # https://github.com/NixOS/nixpkgs/issues/461665
1313 # punes
1414- melonDS
1414+ melonds
1515 # doesn't work retroarchFull
1616 # too complex and need a special controller mame
1717 ];