Move big 3 to run both Runners

This commit is contained in:
Greg Hellings
2025-07-29 23:13:10 -05:00
parent a042a3a0e0
commit 6761cb32f2
6 changed files with 105 additions and 87 deletions
+2 -1
View File
@@ -16,13 +16,14 @@
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
greg = {
tailscale.enable = true;
kubernetes = {
enable = true;
vipInterface = "enp12s0";
priority = 253;
};
remote-builder.enable = true;
runner.enable = true;
tailscale.enable = true;
};
hardware = {
+1 -59
View File
@@ -1,15 +1,10 @@
{
config,
lib,
pkgs,
...
}:
let
environmentVariables = {
EFI_DIR = "${pkgs.OVMF.fd}/FV/";
STORAGE_URL = "s3.thehellings.lan:9000";
};
passthru = [
"1002:164e" # Raphael - embedded GPU
"1002:1640" # Rembrandt - Audio
@@ -18,41 +13,7 @@ let
];
in
{
specialisation = {
vbox.configuration = {
users.extraGroups.vboxusers.members = [ "greg" ];
virtualisation = {
virtualbox.host = {
enable = true;
enableExtensionPack = true;
};
};
services.gitlab-runner.services = lib.mkForce {
vbox = {
inherit environmentVariables;
authenticationTokenConfigFile = config.age.secrets.vbox.path;
executor = "shell";
limit = 5;
};
};
systemd.services.gitlab-runner = {
serviceConfig = {
DevicePolicy = lib.mkForce "auto";
User = "root";
DynamicUser = lib.mkForce false;
};
};
};
};
age.secrets = {
qemu.file = ../../secrets/gitlab/nixos-qemu-shell.age;
vbox.file = ../../secrets/gitlab/nixos-vbox-shell.age;
};
greg.runner.enable = true;
# These options enable sharing of the GPU with the VM
boot = {
# Order matters here, to prevent the AMD driver from getting to the driver before
@@ -77,17 +38,6 @@ in
hardware.graphics.enable = true;
services.gitlab-runner = {
enable = true;
settings.concurrent = 5;
services.qemu = {
inherit environmentVariables;
executor = "shell";
limit = 5;
authenticationTokenConfigFile = config.age.secrets.qemu.path;
};
};
systemd.services = {
"libvirt-nosleep@" = {
description = "Prevent sleep while %i is running";
@@ -98,14 +48,6 @@ in
'';
};
};
gitlab-runner = {
serviceConfig = {
DevicePolicy = lib.mkForce "auto";
User = "root";
DynamicUser = lib.mkForce false;
};
};
};
virtualisation = {