machines/nix/modules/nixos/openstack/default.nix
Kaare Hoff Skovgaard c402ada8f7
All checks were successful
/ dev-shell (push) Successful in 1m18s
/ rust-packages (push) Successful in 2m54s
/ check (push) Successful in 3m21s
/ terraform-providers (push) Successful in 9m33s
/ systems (push) Successful in 8m34s
Get basic nginx and acme setup working
This should enable DNS-01 acme for all khs openstack servers,
thus removing the pain of setting up acme for those servers.

Do note that this might not really be needed that much anymore,
as I should be able to hit them over IPv6, but for ease of mind,
this will enable ACME trivially, also for non https workloads, as well
as servers without open ports.

Do note that currently there's a global unifi firewall rule in place to
allow port 80 and 443 to my own servers over ipv6, I'd like to remove this
and have Nix configure firewall rules for each server individually, as
requested in the setup.
2025-07-11 00:38:31 +02:00

31 lines
766 B
Nix

{
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 {
disko = lib.mkDefault (
lib.khscodes.disko-root-lvm-bios {
device = "/dev/sda";
diskName = cfg.diskName;
}
);
# When this is set as the default, outbound ipv6 doesn't work on the instance.
networking.tempAddresses = "disabled";
boot.loader.grub.efiSupport = false;
boot.loader.timeout = 1;
khscodes.virtualisation.qemu-guest.enable = true;
};
}