caddy
This commit is contained in:
@@ -11,10 +11,13 @@ let
|
||||
cfg = config.${namespace}.services.${name};
|
||||
|
||||
caddyPackage = pkgs.caddy.withPlugins {
|
||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.2" ];
|
||||
plugins = [
|
||||
"github.com/caddy-dns/cloudflare@v0.2.2"
|
||||
];
|
||||
hash = "sha256-dnhEjopeA0UiI+XVYHYpsjcEI6Y1Hacbi28hVKYQURg=";
|
||||
};
|
||||
|
||||
# "github.com/hslatman/caddy-crowdsec-bouncer/http@v0.9.2"
|
||||
caddy = lib.${namespace}.mkModule {
|
||||
inherit config name;
|
||||
description = "caddy Service";
|
||||
@@ -87,14 +90,14 @@ let
|
||||
package = caddyPackage;
|
||||
environmentFile = config.sops.templates."caddy.env".path;
|
||||
email = "jalle008@proton.me";
|
||||
enableReload = false;
|
||||
enableReload = true;
|
||||
dataDir = "${cfg.configDir}/caddy";
|
||||
globalConfig = ''
|
||||
metrics
|
||||
http_port 80
|
||||
https_port 443
|
||||
default_bind 0.0.0.0
|
||||
''; # b710da1b0182eadcb1e569408de778f9f3c50
|
||||
'';
|
||||
virtualHosts = {
|
||||
"*.mjallen.dev" = {
|
||||
extraConfig = ''
|
||||
@@ -102,19 +105,54 @@ let
|
||||
dns cloudflare {$CLOUDFLARE_DNS_API_TOKEN}
|
||||
}
|
||||
|
||||
@gitea host gitea.mjallen.dev
|
||||
handle @gitea {
|
||||
reverse_proxy http://10.0.1.3:3000
|
||||
@authentik host authentik.mjallen.dev
|
||||
handle @authentik {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.authentik.port}
|
||||
}
|
||||
|
||||
@jellyfin host jellyfin.mjallen.dev
|
||||
handle @jellyfin {
|
||||
reverse_proxy http://10.0.1.3:8096
|
||||
@cache host cache.mjallen.dev
|
||||
handle @cache {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.attic.port}
|
||||
}
|
||||
|
||||
@gitea host gitea.mjallen.dev
|
||||
handle @gitea {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.gitea.port}
|
||||
}
|
||||
|
||||
@homeassistant host hass.mjallen.dev
|
||||
handle @homeassistant {
|
||||
reverse_proxy http://10.0.1.4:8123
|
||||
reverse_proxy http://nuc-nixos.local:8123
|
||||
}
|
||||
|
||||
@immich host immich.mjallen.dev
|
||||
handle @immich {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.immich.port}
|
||||
}
|
||||
|
||||
@jellyfin host jellyfin.mjallen.dev
|
||||
handle @jellyfin {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.jellyfin.port}
|
||||
}
|
||||
|
||||
@jellyseerr host jellyseerr.mjallen.dev
|
||||
handle @jellyseerr {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.jellyseerr.port}
|
||||
}
|
||||
|
||||
@lubelogger host lubelogger.mjallen.dev
|
||||
handle @lubelogger {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.lubelogger.port}
|
||||
}
|
||||
|
||||
@matrix host matrix.mjallen.dev
|
||||
handle @matrix {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.matrix.port}
|
||||
}
|
||||
|
||||
@ntfy host ntfy.mjallen.dev
|
||||
handle @ntfy {
|
||||
reverse_proxy http://10.0.1.3:${toString config.${namespace}.services.ntfy.port}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user