mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-24 18:32:24 +00:00
Compare commits
2 Commits
b589ba5d8a
...
939d17ada1
Author | SHA1 | Date | |
---|---|---|---|
|
939d17ada1 | ||
|
dfd52e2cd5 |
@ -31,6 +31,11 @@
|
||||
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 = {
|
||||
source = ../../../private/gitea-runner-token.age; # TOKEN=xyz
|
||||
dest = "${config.secretsDirectory}/gitea-runner-token";
|
||||
|
@ -9,6 +9,7 @@ in {
|
||||
database.type = "sqlite3";
|
||||
settings = {
|
||||
actions.ENABLED = true;
|
||||
metrics.ENABLED = true;
|
||||
repository = {
|
||||
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
||||
DISABLE_HTTP_GIT = false;
|
||||
@ -37,13 +38,36 @@ in {
|
||||
networking.firewall.allowedTCPPorts = [ 122 ];
|
||||
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 ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:3001"; }];
|
||||
upstreams = [{
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user