···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.
···3839Also, I have [Norg document](./nix.norg), containing notes and TODO for the config
4041-I also write some [blog posts about Nix](https://ladas552.me/Flake-Ocean/), feel free to check it out
4243## Nvfetcher
44···5455I also use nvfetcher to fetch nixos modules, the method described in the `flake.nix` file.
5657-[Check out a blog post about it](https://ladas552.me/Flake-Ocean/posts/Nvfetcher/)
5859## Screenshot if you care
60-
6162## Name
63
···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.
···3940Also, I have [Norg document](./nix.norg), containing notes and TODO for the config
4142+I also write some [blog posts about Nix](https://nix.ladas552.me/), feel free to check it out
4344## Nvfetcher
45···5556I also use nvfetcher to fetch nixos modules, the method described in the `flake.nix` file.
5758+[Check out a blog post about it](https://nix.ladas552.me/posts/Nvfetcher/)
5960## Screenshot if you care
61+
6263## Name
64
···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+# find a way to put keys for secrets into respective directories yourself
5+# My way is to `sudo passwd` a new root password and `ssh root@ip` into the vps
6+# Then just `scp ./keys.txt root@ip:/root`
7+8+#!/usr/bin/env bash
9+set -euo pipefail
10+11+ZFS_OPTS="-o ashift=12 \
12+ -O compression=zstd \
13+ -O atime=off \
14+ -O xattr=sa \
15+ -O acltype=posixacl \
16+ -O dnodesize=auto \
17+ -O normalization=formD \
18+ -O mountpoint=none"
19+20+hostname="NixWool"
21+22+read -rp "This will erase the drives, as you sure? [y/N]" confirm
23+if [[ $confirm =~ ^[Yy]$ ]]; then
24+ echo "Proceeding..."
25+else
26+ echo "Aborted."
27+ exit 1
28+fi
29+30+echo "Wiping drives..."
31+# Wipe the NVMe
32+wipefs -a /dev/sda
33+sgdisk --zap-all /dev/sda
34+35+echo "Formatting drives..."
36+# Put boot on the NVMe then fill the rest with ZFS
37+sgdisk -n1:1M:+512M -t1:EF00 -c1:"NIXBOOT" /dev/sda
38+sgdisk -n2:0:+4G -t2:8200 -c2:"Linux Swap" /dev/sda
39+sgdisk -n3:0:0 -t3:BF01 -c3:"ZROOT" /dev/sda
40+41+# Format the boot partition
42+mkfs.vfat -n NIXBOOT -F32 /dev/sda1
43+44+# Swap
45+mkswap -L SWAP /dev/sda2
46+swapon /dev/sda2
47+48+# Create the pool on the drive, use reasonable settings
49+echo "Creating zroot..."
50+zpool create -f $ZFS_OPTS zroot /dev/sda3
51+52+# Mount the drives and prepare for the install
53+mkdir -p /mnt
54+mkdir -p /mnt/{cache,nix,persist,tmp,boot}
55+mount /dev/sda1 /mnt/boot
56+57+# This create the zvols used in this cluster
58+for zvol in "tmp" "nix" "cache" "persist"; do
59+ zfs create -o mountpoint=legacy zroot/$zvol
60+ mount -t zfs zroot/$zvol /mnt/$zvol
61+done
62+63+mkdir -p /mnt/persist/home/ladas552/.ssh
64+mkdir -p /mnt/persist/home/ladas552/.config/sops/age
65+cp ./NixToks /mnt/persist/home/ladas552/.ssh/
66+cp ./keys.txt /mnt/persist/home/ladas552/.config/sops/age/
67+68+nixos-install --no-root-password --flake "github:Ladas552/Flake-Ocean#NixWool"
69+
···11 # snes9x-gtk
12 # https://github.com/NixOS/nixpkgs/issues/461665
13 # punes
14- melonDS
15 # doesn't work retroarchFull
16 # too complex and need a special controller mame
17 ];
···11 # snes9x-gtk
12 # https://github.com/NixOS/nixpkgs/issues/461665
13 # punes
14+ melonds
15 # doesn't work retroarchFull
16 # too complex and need a special controller mame
17 ];