Compare commits
No commits in common. "6f7941aa74aee177e23ffa1bd295e493441cfdf4" and "efafd187d940ef99443125ebb78434d086a570cd" have entirely different histories.
6f7941aa74
...
efafd187d9
3 changed files with 3 additions and 41 deletions
|
|
@ -14,6 +14,5 @@
|
||||||
./beep.nix
|
./beep.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./traefik.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,32 +9,11 @@
|
||||||
server = {
|
server = {
|
||||||
#server.SSH_PORT = 69;
|
#server.SSH_PORT = 69;
|
||||||
DISABLE_REGISTRATION = lib.mkDefault true;
|
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
|
networking.firewall = {
|
||||||
services.traefik = {
|
allowedTCPPorts = [ 3000 ];
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 ];
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue