forgejo actions!!!!!!!!
This commit is contained in:
parent
a1f413b045
commit
623d4040a5
|
@ -28,6 +28,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "git.oat.zone";
|
domain = "git.oat.zone";
|
||||||
port = 3000;
|
port = 3000;
|
||||||
|
enableActions = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
matrix.conduit = {
|
matrix.conduit = {
|
||||||
|
|
|
@ -21,9 +21,15 @@ in {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.unstable.forgejo;
|
default = pkgs.unstable.forgejo;
|
||||||
};
|
};
|
||||||
|
enableActions = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.docker.enable = cfg.enableActions;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
gitea = {
|
gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -44,9 +50,22 @@ in {
|
||||||
HTTP_PORT = cfg.port;
|
HTTP_PORT = cfg.port;
|
||||||
ROOT_URL = "https://${cfg.domain}/";
|
ROOT_URL = "https://${cfg.domain}/";
|
||||||
};
|
};
|
||||||
|
"actions" = {
|
||||||
|
ENABLED = cfg.enableActions;
|
||||||
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gitea-actions-runner = mkIf cfg.enableActions {
|
||||||
|
instances."#{config.networking.hostName}" = {
|
||||||
|
enable = true;
|
||||||
|
name = "ci";
|
||||||
|
url = "https://${cfg.domain}/";
|
||||||
|
labels = []; # use the packaged instance list
|
||||||
|
token = removeSuffix "\n" (builtins.readFile "/etc/forgejo-runner-token");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
nginx.virtualHosts."${cfg.domain}" = {
|
nginx.virtualHosts."${cfg.domain}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
Loading…
Reference in New Issue