Compare commits

..

No commits in common. "6f7941aa74aee177e23ffa1bd295e493441cfdf4" and "efafd187d940ef99443125ebb78434d086a570cd" have entirely different histories.

3 changed files with 3 additions and 41 deletions

View file

@ -14,6 +14,5 @@
./beep.nix
./wireguard.nix
./tailscale.nix
./traefik.nix
];
}

View file

@ -9,32 +9,11 @@
server = {
#server.SSH_PORT = 69;
DISABLE_REGISTRATION = lib.mkDefault true;
ROOT_URL = "http://everest/gitea/";
ROOT_URL = "http://everest.local:3000";
};
};
};
# Set up traefik as the reverse proxy for Gitea
services.traefik = {
dynamicConfigOptions = {
http = {
routers = {
/*
Gitea works best as a subdomain, but I do not have a dns server (yet),
and since tailscale doesn't support adding subdomains with MagicDNS I'll
just put it in a subpath for now
*/
gitea-subpath = {
middlewares = [ "gitea-strip-prefix" ];
rule = "PathPrefix(`/gitea`)";
service = "gitea";
};
};
services.gitea.loadBalancer.servers = [
{ url = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}"; }
];
# Gitea freaks out if you don't remove the subpath it's being proxied from
middlewares.gitea-strip-prefix.stripprefix.prefixes = "/gitea";
};
};
networking.firewall = {
allowedTCPPorts = [ 3000 ];
};
}

View file

@ -1,16 +0,0 @@
{ config, ... }:
{
services.traefik = {
enable = true;
staticConfigOptions = {
# Enable the web ui
api.insecure = true;
api.dashboard = true;
entryPoints = {
http = { address = ":80"; };
};
};
};
networking.firewall.allowedTCPPorts = [ 80 8080 ];
}