{ config, ... }: { disko.devices = { disk.main = { type = "disk"; device = "/dev/sda"; # Only used when building a standalone disk image directly (`nix build # .#nixosConfigurations..config.system.build.diskoImagesScript`) # rather than formatting a real device — see docs/proxmox-images.md. # imageSize sets the .raw file's total size (root's "100%" below fills # whatever's left after ESP + swap within it); imageName keeps each # host's image distinctly named instead of every proxmox-* host # producing an identical "main.raw". imageSize = "20G"; imageName = config.networking.hostName; content = { type = "gpt"; partitions = { esp = { priority = 1; name = "ESP"; size = "512M"; type = "EF00"; content = { type = "filesystem"; format = "vfat"; mountpoint = "/boot"; mountOptions = [ "umask=0077" ]; extraArgs = [ "-F" "32" "-n" "boot" ]; }; }; swap = { size = "8G"; content = { type = "swap"; randomEncryption = false; # label = "swap"; }; }; root = { size = "100%"; content = { type = "filesystem"; format = "ext4"; mountpoint = "/"; extraArgs = [ "-L" "nixos" ]; }; }; }; }; }; }; }