Compare commits

..

2 commits

Author SHA1 Message Date
Tom Hubrecht
b4ded5b2ce feat(containers): Move image storage and factorize some code 2023-12-12 18:39:09 +01:00
Tom Hubrecht
e2c4237b36 feat(shell): Use preferLocalBuild 2023-12-12 18:38:45 +01:00
2 changed files with 22 additions and 13 deletions

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";
};
};
}

View file

@ -48,5 +48,5 @@ pkgs.mkShell {
(sources.disko + "/package.nix")
])) ++ (import ./scripts { inherit pkgs; });
allowSubstitutes = false;
preferLocalBuild = true;
}