blob: 517634007c6e098afb56424c504457a523469b5e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ ... }:
# 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.
# Not a real EFI System Partition (ext4, not FAT32/type EF00) -
# this is a BIOS-boot setup, GRUB just needs a plain filesystem here.
bootfs = {
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 = "/";
};
};
};
};
};
};
}
|