feat(containers): Move image storage and factorize some code

This commit is contained in:
Tom Hubrecht 2023-12-12 18:39:09 +01:00
parent e2c4237b36
commit b4ded5b2ce

View file

@ -1,34 +1,35 @@
{ pkgs, ... }:
let url = "https://git.dgnum.eu";
let
url = "https://git.dgnum.eu";
mkRunner = { labels, name, token }: {
enable = true;
inherit name labels token url;
settings.container = {
network = "host";
options = [ "--cpus=4" ];
};
};
in {
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances = {
instances = builtins.mapAttrs (_: mkRunner) {
runner01 = {
enable = true;
inherit url;
token = "qT9nZXKgLcb3fWOj7VTj3S58raiCWwF0weuIIKlY";
name = "storage01 [debian]";
labels = [ "debian-latest:docker://node:20-bookworm" ];
settings = { container.network = "host"; };
};
runner02 = {
enable = true;
inherit url;
token = "m0rUDBxxkMb6xLTmPFwIieHswJFROqPFByPlT3V9";
name = "storage01 [debian]";
labels = [ "debian-latest:docker://node:20-bookworm" ];
settings = { container.network = "host"; };
};
};
};
@ -41,4 +42,12 @@ in {
ipv6_enabled = true;
};
};
virtualisation.containers.storage.settings = {
storage = {
driver = "overlay";
graphroot = "/data/slow/containers/storage";
runroot = "/run/containers/storage";
};
};
}