fixup! vultr: disable srvos.boot.consoles (#392)

This also fixes the Hetzner-online profile which wasn't tested before
This commit is contained in:
Jonas Chevalier 2024-03-08 11:44:00 +01:00 committed by GitHub
parent fda52d3209
commit 434ad8453d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 44 additions and 13 deletions

View File

@ -30,6 +30,6 @@ let
nixosChecks =
lib.mapAttrs'
(name: value: { name = "${prefix}-${name}"; value = value.config.system.build.toplevel; })
configurations;
(lib.filterAttrs (_name: value: value != null) configurations);
in
nixosChecks // moduleTests

View File

@ -59,15 +59,39 @@ in
}
];
};
example-hardware-hetzner-cloud-arm = nixosSystem {
example-hardware-hetzner-cloud-arm =
if (system == "aarch64-linux") then
nixosSystem
{
modules = [
dummy
self.nixosModules.hardware-hetzner-cloud-arm
{
systemd.network.networks."10-uplink".networkConfig.Address = "::cafe:babe:feed:face:dead:beef";
}
];
} else null;
example-hardware-hetzner-online-amd = nixosSystem {
modules = [
dummy
self.nixosModules.hardware-hetzner-cloud-arm
self.nixosModules.hardware-hetzner-online-amd
{
systemd.network.networks."10-uplink".networkConfig.Address = "::cafe:babe:feed:face:dead:beef";
}
];
};
example-hardware-hetzner-online-intel =
if (system == "x86_64-linux") then
nixosSystem
{
modules = [
dummy
self.nixosModules.hardware-hetzner-online-intel
{
systemd.network.networks."10-uplink".networkConfig.Address = "::cafe:babe:feed:face:dead:beef";
}
];
} else null;
example-hardware-vultr-bare-metal = nixosSystem {
modules = [
dummy

View File

@ -1,4 +1,4 @@
{ lib, config, modulesPath, ... }:
{ lib, config, options, modulesPath, ... }:
{
imports = [
"${modulesPath}/installer/scan/not-detected.nix"
@ -15,9 +15,6 @@
}
];
# To make hetzner kvm console work. It uses VGA rather than serial. Serial leads to nowhere.
srvos.boot.consoles = lib.mkDefault [ ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
@ -40,5 +37,10 @@
# Network configuration i.e. when we unlock machines with openssh in the initrd
boot.initrd.systemd.network.networks."10-uplink" = config.systemd.network.networks."10-uplink";
};
} // (lib.optionalAttrs ((options.srvos.boot or { }) ? consoles) {
# To make hetzner kvm console work. It uses VGA rather than serial. Serial leads to nowhere.
srvos.boot.consoles = lib.mkDefault [ ];
});
}

View File

@ -1,11 +1,16 @@
{ lib, ... }: {
{ options, lib, ... }: {
imports = [
../../mixins/cloud-init.nix
];
services.cloud-init.settings.datasource_list = [ "Vultr" ];
services.cloud-init.settings.datasource.Vultr = { };
config = {
services.cloud-init.settings.datasource_list = [ "Vultr" ];
services.cloud-init.settings.datasource.Vultr = { };
} // (lib.optionalAttrs ((options.srvos.boot or { }) ? consoles) {
# tty1 is used by all of the servers so we don't want a serial console
srvos.boot.consoles = lib.mkDefault [ ];
});
# tty1 is used by all of the servers so we don't want a serial console
srvos.boot.consoles = lib.mkDefault [ ];
}