2023-09-18 17:22:45 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
{
|
|
|
|
options.clan.diskLayouts.singleDiskExt4 = {
|
|
|
|
device = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
example = "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNXAGB12345";
|
|
|
|
};
|
|
|
|
};
|
2024-04-05 13:19:39 +00:00
|
|
|
config = {
|
|
|
|
boot.loader.grub.efiSupport = lib.mkDefault true;
|
|
|
|
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
|
|
|
|
disko.devices = {
|
|
|
|
disk = {
|
|
|
|
main = {
|
|
|
|
type = "disk";
|
|
|
|
device = config.clan.diskLayouts.singleDiskExt4.device;
|
|
|
|
content = {
|
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
boot = {
|
|
|
|
size = "1M";
|
|
|
|
type = "EF02"; # for grub MBR
|
2023-09-18 17:22:45 +00:00
|
|
|
};
|
2024-04-05 13:19:39 +00:00
|
|
|
ESP = {
|
|
|
|
size = "512M";
|
|
|
|
type = "EF00";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
root = {
|
|
|
|
size = "100%";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "ext4";
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
2023-09-18 17:22:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|