Improve performance for gitlab-runner

This commit is contained in:
Greg Hellings
2024-04-03 15:31:02 -05:00
parent b16dcc88a3
commit 55408c55ee
2 changed files with 18 additions and 16 deletions
+16 -14
View File
@@ -56,7 +56,7 @@ in
}; };
gitlab-runner = { gitlab-runner = {
enable = true; enable = true;
settings.concurrent = 2; settings.concurrent = 1;
services = { services = {
shell = { shell = {
executor = "shell"; executor = "shell";
@@ -64,6 +64,8 @@ in
registrationConfigFile = config.age.secrets.runner-reg.path; registrationConfigFile = config.age.secrets.runner-reg.path;
environmentVariables = { environmentVariables = {
EFI_DIR = "${pkgs.OVMF.fd}/FV/"; EFI_DIR = "${pkgs.OVMF.fd}/FV/";
#HTTP_PROXY = "http://10.42.1.4:3128/";
#HTTPS_PROXY = "http://10.42.1.4:3128/";
}; };
}; };
}; };
@@ -95,7 +97,19 @@ in
"network-online.target" "network-online.target"
"systemd-resolved.service" "systemd-resolved.service"
]; ];
path = with pkgs; [ preStart = builtins.concatStringsSep "\n" [
"${pkgs.kmod}/bin/modprobe vboxdrv"
"${pkgs.kmod}/bin/modprobe vboxnetadp"
"${pkgs.kmod}/bin/modprobe vboxnetflt"
];
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
serviceConfig = {
DevicePolicy = lib.mkForce "auto";
User = "root";
DynamicUser = lib.mkForce false;
};
};
environment.systemPackages = with pkgs; [
curl curl
gawk gawk
git git
@@ -110,18 +124,6 @@ in
vagrant vagrant
wget wget
]; ];
preStart = builtins.concatStringsSep "\n" [
"${pkgs.kmod}/bin/modprobe vboxdrv"
"${pkgs.kmod}/bin/modprobe vboxnetadp"
"${pkgs.kmod}/bin/modprobe vboxnetflt"
];
postStop = "${pkgs.kmod}/bin/rmmod vboxnetadp vboxnetflt vboxdrv";
serviceConfig = {
DevicePolicy = lib.mkForce "auto";
User = "root";
DynamicUser = lib.mkForce false;
};
};
networking.firewall.allowedTCPPorts = [ 18083 ]; # Should be interface for vboxweb networking.firewall.allowedTCPPorts = [ 18083 ]; # Should be interface for vboxweb
} }
Binary file not shown.