add separate root nix disko config

This commit is contained in:
Noah Masur 2023-02-26 10:55:36 -05:00
parent afa62c5510
commit 3fe6911e2d
2 changed files with 45 additions and 0 deletions

44
disks/root.nix Normal file
View File

@ -0,0 +1,44 @@
{ disks, ... }: {
disk = {
boot = {
type = "disk";
device = builtins.elemAt disks 0;
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" ];
};
}
];
};
};
};
}

View File

@ -153,6 +153,7 @@
}; };
diskoConfigurations = { diskoConfigurations = {
root = import ./disks/root.nix;
swan = { ... }: (import ./hosts/swan/disks.nix { }).disko.devices; swan = { ... }: (import ./hosts/swan/disks.nix { }).disko.devices;
}; };