mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-25 18:14:52 +00:00
45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{ disk, ... }: {
|
|
disk = {
|
|
boot = {
|
|
type = "disk";
|
|
device = disk;
|
|
content = {
|
|
type = "table";
|
|
format = "gpt";
|
|
partitions = [
|
|
# Boot partition
|
|
{
|
|
type = "partition";
|
|
name = "ESP";
|
|
start = "0";
|
|
end = "512MiB";
|
|
fs-type = "fat32";
|
|
bootable = true;
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
extraArgs = [ "-n boot" ];
|
|
};
|
|
}
|
|
# Root partition ext4
|
|
{
|
|
type = "partition";
|
|
name = "root";
|
|
start = "512MiB";
|
|
end = "100%";
|
|
part-type = "primary";
|
|
bootable = true;
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
extraArgs = [ "-L nixos" ];
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|