39 lines
910 B
Nix
39 lines
910 B
Nix
{ lib, config, ... }:
|
|
let cfg = config.lab.disko;
|
|
in {
|
|
options.lab.disko.osDiskDevice = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = ''
|
|
The disk device to be used for the operating system.
|
|
'';
|
|
};
|
|
|
|
# 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%"; };
|
|
};
|
|
};
|
|
};
|
|
}
|