2023-12-16 22:47:18 +00:00
|
|
|
{ lib, config, ... }:
|
2023-12-29 12:46:12 +00:00
|
|
|
let cfg = config.lab.disko;
|
2023-12-16 22:47:18 +00:00
|
|
|
in {
|
2023-12-29 12:46:12 +00:00
|
|
|
options.lab.disko.osDiskDevice = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
description = ''
|
|
|
|
The disk device to be used for the operating system.
|
|
|
|
'';
|
2023-12-16 22:47:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# TODO: rename this to 'osDisk'. Unfortunately, we would need to run nixos-anywhere again then
|
|
|
|
config.disko.devices.disk.vdb = {
|
|
|
|
device = cfg.osDiskDevice;
|
|
|
|
type = "disk";
|
|
|
|
content = {
|
|
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
|
|
ESP = {
|
|
|
|
type = "EF00";
|
|
|
|
size = "500M";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "vfat";
|
|
|
|
mountpoint = "/boot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
root = {
|
|
|
|
end = "-4G";
|
|
|
|
content = {
|
|
|
|
type = "filesystem";
|
|
|
|
format = "btrfs";
|
|
|
|
mountpoint = "/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
swap = { size = "100%"; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|