dotfiles/disks/root.nix

39 lines
922 B
Nix
Raw Normal View History

2023-02-27 01:03:39 +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
ESP = rec {
2024-02-18 14:41:48 +00:00
size = "512MiB";
type = "EF00";
label = "boot";
device = "/dev/disk/by-label/${label}";
2023-02-26 15:55:36 +00:00
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
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
root = rec {
2024-02-18 14:41:48 +00:00
size = "100%";
label = "nixos";
device = "/dev/disk/by-label/${label}";
2023-02-26 15:55:36 +00:00
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
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
};
};
};
}