Add gitea act runner
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -74,6 +74,7 @@ in
|
||||
"gitea/internalToken".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
"gitea/jwtSecret".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
"gitea/lfsJwtSecret".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
"gitea/runnerRegistrationToken".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
"gitea/admin".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
"gitea/authelia/password".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
"gitea/authelia/digest".sopsFile = "${inputs.secrets}/hosts/jupiter/secrets.yaml";
|
||||
@@ -86,6 +87,12 @@ in
|
||||
|
||||
gitea-env.content = ''
|
||||
GITEA_OAUTH_SECRET=${hmConfig.sops.placeholder."gitea/authelia/password"}
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN=${hmConfig.sops.placeholder."gitea/runnerRegistrationToken"}
|
||||
GITEA_ADMIN_PASSWORD=${hmConfig.sops.placeholder."gitea/admin"}
|
||||
'';
|
||||
|
||||
gitea-act-runner-env.content = ''
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN=${hmConfig.sops.placeholder."gitea/runnerRegistrationToken"}
|
||||
GITEA_ADMIN_PASSWORD=${hmConfig.sops.placeholder."gitea/admin"}
|
||||
'';
|
||||
|
||||
@@ -98,6 +105,7 @@ in
|
||||
sections = {
|
||||
server = {
|
||||
ROOT_URL = "https://git.karaolidis.com:443/";
|
||||
LANDING_PAGE = "explore";
|
||||
|
||||
# FIXME: https://github.com/go-gitea/gitea/issues/31112
|
||||
OFFLINE_MODE = false;
|
||||
@@ -203,6 +211,8 @@ in
|
||||
volumes = {
|
||||
gitea-postgresql = { };
|
||||
gitea = { };
|
||||
gitea-act-runner-data = { };
|
||||
gitea-act-runner-cache = { };
|
||||
};
|
||||
|
||||
containers = {
|
||||
@@ -262,6 +272,32 @@ in
|
||||
unitConfig.After = [ "sops-nix.service" ];
|
||||
};
|
||||
|
||||
gitea-act-runner = {
|
||||
containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-gitea-act-runner}";
|
||||
networks = [ networks.gitea.ref ];
|
||||
volumes =
|
||||
let
|
||||
uid = builtins.toString config.users.users.${user}.uid;
|
||||
in
|
||||
[
|
||||
"/run/user/${uid}/podman/podman.sock:/var/run/docker.sock"
|
||||
"${volumes.gitea-act-runner-data.ref}:/var/lib/gitea-act-runner"
|
||||
"${volumes.gitea-act-runner-cache.ref}:/tmp/gitea-act-runner"
|
||||
];
|
||||
environments = {
|
||||
GITEA_INSTANCE_URL = "https://git.karaolidis.com";
|
||||
GITEA_ADMIN_USERNAME = "admin";
|
||||
};
|
||||
environmentFiles = [ hmConfig.sops.templates.gitea-act-runner-env.path ];
|
||||
};
|
||||
|
||||
unitConfig = {
|
||||
After = [ "sops-nix.service" ];
|
||||
Requires = [ "${containers.gitea._serviceName}.service" ];
|
||||
};
|
||||
};
|
||||
|
||||
authelia.containerConfig.volumes = [
|
||||
"${hmConfig.sops.templates.authelia-gitea.path}:/etc/authelia/conf.d/gitea.yaml:ro"
|
||||
];
|
||||
|
Reference in New Issue
Block a user