Compare commits
No commits in common. "4b2c7464f066b9ea16e4ff8b4e60a995c194a659" and "3e3bcd95844bc785961e5b206a5c091d8282ca88" have entirely different histories.
4b2c7464f0
...
3e3bcd9584
4 changed files with 11 additions and 35 deletions
|
|
@ -35,8 +35,6 @@ in {
|
||||||
dash = [
|
dash = [
|
||||||
[ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ]
|
[ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ]
|
||||||
[ "Forgejo" "forgejo" "https://git.${domain}" "http://localhost:5080/" ]
|
[ "Forgejo" "forgejo" "https://git.${domain}" "http://localhost:5080/" ]
|
||||||
[ "Copyparty" "files" "https://cdn.${domain}" "http://localhost:3923/" ]
|
|
||||||
[ "CryptPad" "cryptpad" "https://docs.${domain}" "http://localhost:7090/" ]
|
|
||||||
[ "CodeServer" "coder" "https://code.proxy.${domain}" "http://localhost:8443/" ]
|
[ "CodeServer" "coder" "https://code.proxy.${domain}" "http://localhost:8443/" ]
|
||||||
[ "AdGuardHome" "adguard" "https://dns.proxy.${domain}" "http://localhost:8088/" ]
|
[ "AdGuardHome" "adguard" "https://dns.proxy.${domain}" "http://localhost:8088/" ]
|
||||||
[ "Traefik" "traefikproxy" "https://dynamic.proxy.${domain}/dashboard/" "" ]
|
[ "Traefik" "traefikproxy" "https://dynamic.proxy.${domain}/dashboard/" "" ]
|
||||||
|
|
@ -48,15 +46,6 @@ in {
|
||||||
[ "SearXNG" "searxng" "https://search.proxy.${domain}" "http://localhost:8091/" ]
|
[ "SearXNG" "searxng" "https://search.proxy.${domain}" "http://localhost:8091/" ]
|
||||||
[ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ]
|
[ "Dockge" "docker" "https://containers.proxy.${domain}" "http://localhost:5001/" ]
|
||||||
];
|
];
|
||||||
routes = {
|
|
||||||
"git.${domain}" = "http://localhost:5080";
|
|
||||||
"cdn.${domain}" = "http://localhost:3923";
|
|
||||||
"docs.${domain}" = "http://localhost:7090";
|
|
||||||
"auth.${domain}" = "http://localhost:1411";
|
|
||||||
"dash.${domain}" = "http://localhost:5070";
|
|
||||||
"media.${domain}" = "http://localhost:8096";
|
|
||||||
"gallery.${domain}" = "http://localhost:2284";
|
|
||||||
};
|
|
||||||
proxy = {
|
proxy = {
|
||||||
base = "proxy.${domain}";
|
base = "proxy.${domain}";
|
||||||
hosts = {
|
hosts = {
|
||||||
|
|
@ -76,7 +65,6 @@ in {
|
||||||
"pass" = d "http://localhost:8060";
|
"pass" = d "http://localhost:8060";
|
||||||
"auth" = d "http://localhost:1411";
|
"auth" = d "http://localhost:1411";
|
||||||
"git" = d "http://localhost:5080";
|
"git" = d "http://localhost:5080";
|
||||||
"cdn" = d "http://localhost:3923";
|
|
||||||
"ai" = d "http://localhost:8080";
|
"ai" = d "http://localhost:8080";
|
||||||
"@" = d "http://localhost:5070";
|
"@" = d "http://localhost:5070";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
environment.systemPackages = with pkgs; [ copyparty-most ];
|
|
||||||
|
|
||||||
# TODO: systemd service
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{ homelab, ... }: let
|
|
||||||
domain = "docs.${homelab.domain}";
|
|
||||||
in {
|
|
||||||
services.cryptpad = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
httpPort = 7090;
|
|
||||||
websocketPort = 7080;
|
|
||||||
httpUnsafeOrigin = "https://${domain}";
|
|
||||||
httpSafeOrigin = "https://${domain}";
|
|
||||||
blockDailyCheck = true;
|
|
||||||
disableIntegratedEviction = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +1,19 @@
|
||||||
{ pkgs, lib, homelab, ... }: {
|
{ pkgs, lib, homelab, ... }: let
|
||||||
|
routes = {
|
||||||
|
"git.${homelab.domain}" = "http://localhost:5080";
|
||||||
|
"auth.${homelab.domain}" = "http://localhost:1411";
|
||||||
|
"dash.${homelab.domain}" = "http://localhost:5070";
|
||||||
|
"media.${homelab.domain}" = "http://localhost:8096";
|
||||||
|
"gallery.${homelab.domain}" = "http://localhost:2284";
|
||||||
|
};
|
||||||
|
in {
|
||||||
services.cloudflared = {
|
services.cloudflared = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tunnels.homelab = {
|
tunnels.homelab = {
|
||||||
credentialsFile = "/mnt/data/cloudflared/homelab.json";
|
credentialsFile = "/mnt/data/cloudflared/homelab.json";
|
||||||
certificateFile = "/mnt/data/cloudflared/cert.pem";
|
certificateFile = "/mnt/data/cloudflared/cert.pem";
|
||||||
default = "http_status:404";
|
default = "http_status:404";
|
||||||
ingress = homelab.routes;
|
ingress = routes;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -24,6 +32,6 @@
|
||||||
script = lib.concatMapStringsSep "\n" (domain: ''
|
script = lib.concatMapStringsSep "\n" (domain: ''
|
||||||
echo "Ensuring DNS route for ${domain}..."
|
echo "Ensuring DNS route for ${domain}..."
|
||||||
${pkgs.cloudflared}/bin/cloudflared tunnel --origincert /mnt/data/cloudflared/cert.pem route dns ${homelab.cf-tunnel-id} ${domain} || true
|
${pkgs.cloudflared}/bin/cloudflared tunnel --origincert /mnt/data/cloudflared/cert.pem route dns ${homelab.cf-tunnel-id} ${domain} || true
|
||||||
'') (builtins.attrNames homelab.routes);
|
'') (builtins.attrNames routes);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue