feat: some slight improvements to control storage useage for teh runner

This commit is contained in:
silver 2023-11-20 20:53:39 +00:00
parent 20f9a38aed
commit a1be738883

View file

@ -30,7 +30,7 @@ in {
docker = { docker = {
image = mkOption { image = mkOption {
default = "alpine:latest"; default = "alpine:3.18.4";
type = types.str; type = types.str;
}; };
@ -54,6 +54,7 @@ in {
age.secrets.runner_02_general.file = ../secrets/gitlab/runners/runner02.age; age.secrets.runner_02_general.file = ../secrets/gitlab/runners/runner02.age;
boot.kernel.sysctl."net.ipv4.ip_forward" = true; # 1 boot.kernel.sysctl."net.ipv4.ip_forward" = true; # 1
virtualisation.docker.enable = true;
# taken from https://github.com/NixOS/nixpkgs/issues/245365#issuecomment-1663854128 # taken from https://github.com/NixOS/nixpkgs/issues/245365#issuecomment-1663854128
virtualisation.docker.listenOptions = ["/run/docker.sock" "127.0.0.1:2375"]; virtualisation.docker.listenOptions = ["/run/docker.sock" "127.0.0.1:2375"];
@ -61,10 +62,10 @@ in {
services.gitlab-runner = { services.gitlab-runner = {
enable = true; enable = true;
clear-docker-cache = { # clear-docker-cache = {
enable = true; # enable = true;
dates = cfg.runner.docker.cleanup_dates; # dates = cfg.runner.docker.cleanup_dates;
}; # };
services = { services = {
# might make a function later to have multiple runners, might never need it though # might make a function later to have multiple runners, might never need it though