diff options
| author | Karan Jayachandra <karan.jayachandra@nxp.com> | 2026-07-17 14:34:18 +0200 |
|---|---|---|
| committer | Karan Jayachandra <karan.jayachandra@nxp.com> | 2026-07-17 14:34:18 +0200 |
| commit | 0d0788cd4ee378fba19e47a2c5d5527c196b65e0 (patch) | |
| tree | 0fbd0e2644e94e0227005947004541fd4ff4d53e /hosts/eurovm/disko.nix | |
Initial commit
Diffstat (limited to 'hosts/eurovm/disko.nix')
| -rw-r--r-- | hosts/eurovm/disko.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/hosts/eurovm/disko.nix b/hosts/eurovm/disko.nix new file mode 100644 index 0000000..d1ec85c --- /dev/null +++ b/hosts/eurovm/disko.nix @@ -0,0 +1,47 @@ +{ ... }: + +# Disk layout for nixos-anywhere + disko. +# Targets a single virtio disk (typical for Hetzner Cloud). +# GPT with a BIOS-boot partition so GRUB works without UEFI. +{ + disko.devices = { + disk.main = { + # Hetzner Cloud primary disk is /dev/sda on most instance types. + # On NVMe instances it will be /dev/nvme0n1 - update accordingly. + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + # 1 MiB BIOS-boot partition required by GRUB on GPT disks + boot = { + size = "1M"; + type = "EF02"; # BIOS boot + priority = 1; + }; + + # 512 MiB /boot - keeps kernels/initrds out of root for clarity + ESP = { + size = "512M"; + type = "8300"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/boot"; + }; + }; + + # Root partition - all remaining space + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; +} |
