{ lib, ... }: { disko.devices = { disk = { "system-1" = { type = "disk"; device = "${BOOT_DISK_1}"; content = { type = "gpt"; partitions = { ESP = { size = "1G"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "umask=0077" ]; }; }; crypt_p1 = { size = "100%"; content = { type = "luks"; name = "nixos-p1"; settings = { allowDiscards = true; }; }; }; }; }; }; "system-2" = { type = "disk"; device = "${BOOT_DISK_2}"; content = { type = "gpt"; partitions = { crypt_p2 = { size = "100%"; content = { type = "luks"; name = "nixos-p2"; settings = { allowDiscards = true; }; content = { type = "btrfs"; extraArgs = [ "-d raid1" "/dev/mapper/nixos-p1" ]; subvolumes = { "/root" = { mountpoint = "/"; mountOptions = [ "rw" "relatime" "ssd" ]; }; "/swap" = { mountpoint = "none"; swap.size = "16G"; }; }; }; }; }; }; }; };