44 lines
966 B
Nix
44 lines
966 B
Nix
|
{ lib, config, ... }:
|
||
|
let cfg = config.custom.disko;
|
||
|
in {
|
||
|
options = {
|
||
|
custom = {
|
||
|
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%"; };
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|