{ ... }: # Declarative OS-disk layout (disko). UEFI: GPT with an ESP + ext4 root. # disko both PARTITIONS/FORMATS this disk and generates the NixOS # `fileSystems.*` entries, so hardware-configuration.nix must NOT define # fileSystems for "/" or "/boot". # # ⚠️ This disk is WIPED on install. Set `device` to the OS disk ONLY. # Your NAS data disk is NOT listed here — keep it out of disko so it is # never formatted; mount it as a plain read-write fileSystem instead # (see configuration.nix, /mnt/data). # # Find the stable id: ls -l /dev/disk/by-id (use by-id, never /dev/sdX) { disko.devices.disk.os = { type = "disk"; device = "/dev/disk/by-id/CHANGE-ME-os-disk"; content = { type = "gpt"; partitions = { ESP = { size = "512M"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "umask=0077" ]; }; }; root = { size = "100%"; content = { type = "filesystem"; format = "ext4"; mountpoint = "/"; }; }; }; }; }; }