Files
clan-core/templates/flake-parts/modules/disko.nix
2024-09-06 18:55:00 +02:00

46 lines
1.1 KiB
Nix

{ lib, ... }:
let
suffix = config.clan.core.machine.diskId;
in
{
boot.loader.grub.efiSupport = lib.mkDefault true;
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
disko.devices = {
disk = {
main = {
type = "disk";
# Set the following in flake.nix for each maschine:
# device = <uuid>;
content = {
type = "gpt";
partitions = {
"boot-${suffix}" = {
size = "1M";
type = "EF02"; # for grub MBR
priority = 1;
};
"ESP-${suffix}" = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
"root-${suffix}" = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}