forked from DGNum/infrastructure
feat(containers): Move image storage and factorize some code
This commit is contained in:
parent
e2c4237b36
commit
b4ded5b2ce
1 changed files with 21 additions and 12 deletions
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue