This commit is contained in:
Kristian Krsnik 2024-04-08 22:09:31 +02:00
parent 9e2042ae3a
commit 3656d672c4
Signed by: Kristian
GPG Key ID: FD1330AC9F909E85
2 changed files with 70 additions and 79 deletions

View File

@ -3,7 +3,6 @@
device ? throw "Missing required argument device. (e.g. /dev/sda)",
swapCapacity ? throw "Missing required argument swapCapacity. (e.g. 16G)",
ssd ? false,
efi ? true,
...
}: {
disko.devices = {
@ -13,8 +12,22 @@
type = "disk";
content = {
type = "gpt";
partitions =
{
partitions = {
"boot" = {
size = "512M";
type = "EF02";
};
"esp" = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
"luks" = {
size = "100%";
content = {
@ -73,29 +86,8 @@
};
};
};
}
// (
if efi
then {
"esp" = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
}
else {
"boot" = {
size = "512M";
type = "EF02";
};
}
);
};
};
};
};

View File

@ -3,5 +3,4 @@ libs.diskSetup {
device = "/dev/sda";
ssd = true;
swapCapacity = "2G";
efi = true;
}