# Single-disk ZFS layout for the Topton's 256GB mSATA SSD: vfat ESP for boot, # the rest a zpool (zstd compression, no atime). Single disk = no redundancy; # ZFS buys us compression, snapshots, and checksumming. Requires # networking.hostId (set in configuration.nix). The device is a placeholder: # boot the installer, read the real id from `ls -l /dev/disk/by-id/`, and fill # it in before `clan machines install`. Changing the layout later requires # wiping and reinstalling. { boot.loader.grub.efiSupport = true; boot.loader.grub.efiInstallAsRemovable = true; boot.loader.grub.enable = true; disko.devices = { disk = { main = { name = "main-gw-cnx-1"; device = "/dev/disk/by-id/CHANGE-ME-msata-ssd"; type = "disk"; content = { type = "gpt"; partitions = { "boot" = { size = "1M"; type = "EF02"; # for grub MBR priority = 1; }; ESP = { type = "EF00"; size = "500M"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "umask=0077" ]; }; }; zfs = { size = "100%"; content = { type = "zfs"; pool = "rpool"; }; }; }; }; }; }; zpool = { rpool = { type = "zpool"; options.ashift = "12"; rootFsOptions = { compression = "zstd"; acltype = "posixacl"; xattr = "sa"; atime = "off"; mountpoint = "none"; }; datasets = { root = { type = "zfs_fs"; mountpoint = "/"; }; nix = { type = "zfs_fs"; mountpoint = "/nix"; }; # Service state (Omada, Kea leases, CrowdSec db, journald) — its own # dataset so it can be snapshotted/sent independently of the OS. var = { type = "zfs_fs"; mountpoint = "/var"; }; }; }; }; }; }