2024-04-13 13:03:44 +00:00
|
|
|
{ disk, ... }:
|
|
|
|
{
|
2023-02-26 15:55:36 +00:00
|
|
|
disk = {
|
|
|
|
boot = {
|
|
|
|
type = "disk";
|
2023-02-27 01:03:39 +00:00
|
|
|
device = disk;
|
2023-02-26 15:55:36 +00:00
|
|
|
content = {
|
2024-02-18 14:41:48 +00:00
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
2023-02-26 15:55:36 +00:00
|
|
|
# Boot partition
|
2024-02-19 14:28:13 +00:00
|
|
|
ESP = rec {
|
2024-02-18 14:41:48 +00:00
|
|
|
size = "512MiB";
|
|
|
|
type = "EF00";
|
2024-02-19 14:28:13 +00:00
|
|
|
label = "boot";
|
|
|
|
device = "/dev/disk/by-label/${label}";
|
2023-02-26 15:55:36 +00:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
2024-02-19 14:28:13 +00:00
|
|
|
extraArgs = [ "-n ${label}" ];
|
2023-02-26 15:55:36 +00:00
|
|
|
};
|
2024-02-18 14:41:48 +00:00
|
|
|
};
|
2023-02-26 15:55:36 +00:00
|
|
|
# Root partition ext4
|
2024-02-19 14:28:13 +00:00
|
|
|
root = rec {
|
2024-02-18 14:41:48 +00:00
|
|
|
size = "100%";
|
2024-02-19 14:28:13 +00:00
|
|
|
label = "nixos";
|
|
|
|
device = "/dev/disk/by-label/${label}";
|
2023-02-26 15:55:36 +00:00
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/";
|
2024-02-19 14:28:13 +00:00
|
|
|
extraArgs = [ "-L ${label}" ];
|
2023-02-26 15:55:36 +00:00
|
|
|
};
|
2024-02-18 14:41:48 +00:00
|
|
|
};
|
|
|
|
};
|
2023-02-26 15:55:36 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|