Compare commits

..

No commits in common. "939d17ada11f1d3b69eca2acfb57fc08c3bbe762" and "b589ba5d8a644ffb4039bd838418c3f564009514" have entirely different histories.

2 changed files with 7 additions and 36 deletions

View File

@ -31,11 +31,6 @@
tokenFile = config.secrets.giteaRunnerToken.dest; tokenFile = config.secrets.giteaRunnerToken.dest;
}; };
# Make sure the runner doesn't start until after Gitea
systemd.services."gitea-runner-${config.networking.hostName}".after =
[ "gitea.service" ];
# API key needed to connect to Gitea
secrets.giteaRunnerToken = { secrets.giteaRunnerToken = {
source = ../../../private/gitea-runner-token.age; # TOKEN=xyz source = ../../../private/gitea-runner-token.age; # TOKEN=xyz
dest = "${config.secretsDirectory}/gitea-runner-token"; dest = "${config.secretsDirectory}/gitea-runner-token";

View File

@ -9,7 +9,6 @@ in {
database.type = "sqlite3"; database.type = "sqlite3";
settings = { settings = {
actions.ENABLED = true; actions.ENABLED = true;
metrics.ENABLED = true;
repository = { repository = {
DEFAULT_PUSH_CREATE_PRIVATE = true; DEFAULT_PUSH_CREATE_PRIVATE = true;
DISABLE_HTTP_GIT = false; DISABLE_HTTP_GIT = false;
@ -38,36 +37,13 @@ in {
networking.firewall.allowedTCPPorts = [ 122 ]; networking.firewall.allowedTCPPorts = [ 122 ];
users.users.${config.user}.extraGroups = [ "gitea" ]; users.users.${config.user}.extraGroups = [ "gitea" ];
caddy.routes = [ caddy.routes = [{
{
match = [{
host = [ config.hostnames.git ];
path = [ "/metrics*" ];
}];
handle = [{
handler = "static_response";
status_code = "403";
}];
}
{
match = [{ host = [ config.hostnames.git ]; }]; match = [{ host = [ config.hostnames.git ]; }];
handle = [{ handle = [{
handler = "reverse_proxy"; handler = "reverse_proxy";
upstreams = [{ upstreams = [{ dial = "localhost:3001"; }];
dial = "localhost:${
builtins.toString
config.services.gitea.settings.server.HTTP_PORT
}";
}]; }];
}]; }];
}
];
prometheus.scrapeTargets = [
"127.0.0.1:${
builtins.toString config.services.gitea.settings.server.HTTP_PORT
}"
];
## Backup config ## Backup config