2025-04-04 20:14:30 -03:00
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
pkgs-unstable,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
imports = [];
|
|
|
|
|
|
|
|
|
|
services.caddy.enable = true;
|
|
|
|
|
services.caddy.virtualHosts = let
|
|
|
|
|
forgejo-port = config.services.forgejo.settings.server.HTTP_PORT;
|
|
|
|
|
in {
|
|
|
|
|
":${toString (forgejo-port + 10)}" = {
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
reverse_proxy http://localhost${config.services.anubis.instances."forgejo".bind} {
|
|
|
|
|
header_up X-Real-Ip {remote_host}
|
|
|
|
|
}
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
};
|
2025-04-04 20:15:09 -03:00
|
|
|
virtualisation.oci-containers.containers.cloudflare-funnel = let
|
|
|
|
|
secrets = config.spacestation-secrets.lesser;
|
|
|
|
|
in {
|
|
|
|
|
image = "cloudflare/cloudflared:latest";
|
|
|
|
|
autoStart = true;
|
|
|
|
|
extraOptions = [
|
|
|
|
|
"--network=host"
|
|
|
|
|
];
|
|
|
|
|
cmd = [
|
|
|
|
|
"tunnel"
|
|
|
|
|
"--no-autoupdate"
|
|
|
|
|
"run"
|
|
|
|
|
"--token"
|
|
|
|
|
secrets.capytal.cloudflare-funnel
|
|
|
|
|
];
|
|
|
|
|
environment = {};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
|
80
|
|
|
|
|
433
|
|
|
|
|
];
|
2025-04-04 20:14:30 -03:00
|
|
|
}
|