2025-07-08 12:27:00 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.khscodes.openstack;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.khscodes.openstack = {
|
|
|
|
enable = lib.mkEnableOption "Enables the machine as a openstack machine";
|
|
|
|
diskName = lib.mkOption {
|
|
|
|
type = lib.types.str;
|
|
|
|
default = "nixos";
|
|
|
|
description = "Name of the root disk device";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
2025-07-09 23:53:42 +02:00
|
|
|
disko = lib.mkDefault (
|
2025-07-10 00:51:28 +02:00
|
|
|
lib.khscodes.disko-root-lvm-bios {
|
2025-07-09 23:53:42 +02:00
|
|
|
device = "/dev/sda";
|
|
|
|
diskName = cfg.diskName;
|
|
|
|
}
|
|
|
|
);
|
2025-07-11 00:38:31 +02:00
|
|
|
# When this is set as the default, outbound ipv6 doesn't work on the instance.
|
|
|
|
networking.tempAddresses = "disabled";
|
2025-07-08 16:08:37 +02:00
|
|
|
boot.loader.grub.efiSupport = false;
|
|
|
|
boot.loader.timeout = 1;
|
2025-07-10 00:51:28 +02:00
|
|
|
khscodes.virtualisation.qemu-guest.enable = true;
|
2025-07-08 12:27:00 +02:00
|
|
|
};
|
|
|
|
}
|