diff --git a/.gitea/workflows/analysis.yml b/.gitea/workflows/analysis.yml index 0eecac5..79ec542 100644 --- a/.gitea/workflows/analysis.yml +++ b/.gitea/workflows/analysis.yml @@ -11,3 +11,5 @@ jobs: with: name: statix - uses: https://github.com/jocelynthode/statix-action@master + with: + create_pr: true diff --git a/modules/gitea/thea/virtualisation.nix b/modules/gitea/thea/virtualisation.nix index ba7940d..d86eec8 100644 --- a/modules/gitea/thea/virtualisation.nix +++ b/modules/gitea/thea/virtualisation.nix @@ -1,15 +1,10 @@ -{nodes, ...}: { +{nodes, pkgs, ...}: { systemd.sockets.podman.socketConfig.Symlinks = [ "/run/docker.sock" ]; virtualisation = { containers = { enable = true; - # storage.settings = { - # storage = { - # driver = "btrfs"; - # }; - # }; }; podman = { enable = true; @@ -20,16 +15,31 @@ }; }; - virtualisation.oci-containers.containers = { + virtualisation.oci-containers.containers = let + runner_config = pkgs.writeTextFile { + name = "config.yml"; + text = '' + container: + network: "bridge" + ''; + }; + in { gitea-runner = { image = "gitea/act_runner@sha256:8477d5b61b655caad4449888bae39f1f34bebd27db56cb15a62dccb3dcf3a944"; autoStart = true; + + # capabilities = { + # NET_RAW = true; + # }; + environment = { GITEA_INSTANCE_URL = nodes.sin.config.services.gitea.settings.server.ROOT_URL; GITEA_RUNNER_REGISTRATION_TOKEN = "uEDPBW6Z9oItAKRtloVwis0LkPbD4OmV2w5esOhW"; + CONFIG_FILE = "/config.yml"; }; volumes = [ "/var/run/docker.sock:/var/run/docker.sock" + "${runner_config}:/config.yml:ro" ]; }; };