nixos-config/configs/nixos/ni/disko.nix
Gabriel Arazas 0760acb676
configs: consolidate NixOS and home-manager config into one configs folder
Now we're going beyond these structuring as we might have to accomodate
non-system configurations like Nixvim.
2024-01-15 07:45:43 +08:00

49 lines
959 B
Nix

{ disks ? [ "/dev/nvme0n1" ], ... }:
{
disk.primary = {
device = builtins.elemAt disks 0;
type = "disk";
content = {
format = "gpt";
type = "table";
partitions = [
{
name = "root";
start = "512MiB";
end = "-8GiB";
part-type = "primary";
content = {
type = "filesystem";
mountpoint = "/";
format = "ext4";
};
}
{
name = "ESP";
start = "0";
end = "512MiB";
bootable = true;
content = {
type = "filesystem";
mountpoint = "/boot";
format = "vfat";
};
}
{
name = "swap";
start = "-8GiB";
end = "100%";
part-type = "primary";
content = {
type = "swap";
randomEncryption = true;
};
}
];
};
};
}