wow
This commit is contained in:
parent
1def54ac15
commit
006bcb47ce
3 changed files with 27 additions and 7 deletions
1
flake.lock
generated
1
flake.lock
generated
|
|
@ -1104,3 +1104,4 @@
|
||||||
"root": "root",
|
"root": "root",
|
||||||
"version": 7
|
"version": 7
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ in
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
package = pkgs.caddy.withPlugins {
|
package = pkgs.caddy.withPlugins {
|
||||||
plugins = [
|
plugins = [
|
||||||
"github.com/caddy-dns/cloudflare@v0.2.2"
|
"github.com/caddy-dns/cloudflare@v0.2.4"
|
||||||
"github.com/aksdb/caddy-cgi/v2@v2.2.6"
|
"github.com/aksdb/caddy-cgi/v2@v2.2.6"
|
||||||
"github.com/shift72/caddy-geo-ip@v0.6.0"
|
"github.com/shift72/caddy-geo-ip@v0.6.0"
|
||||||
"github.com/lolPants/caddy-requestid@v1.1.2"
|
"github.com/lolPants/caddy-requestid@v1.1.2"
|
||||||
|
|
@ -161,7 +161,7 @@ in
|
||||||
"github.com/RussellLuo/caddy-ext/ratelimit@v0.3.0"
|
"github.com/RussellLuo/caddy-ext/ratelimit@v0.3.0"
|
||||||
"github.com/neodyme-labs/user_agent_parse@v0.0.1"
|
"github.com/neodyme-labs/user_agent_parse@v0.0.1"
|
||||||
];
|
];
|
||||||
hash = "sha256-z9/LF2gws+H0pKL6F62QfklD0W8DKWCccnXLOOs3+jY=";
|
hash = "sha256-r4MgRk8HpKYx7f8FmA3PKgD/5ZNTIHpQvlE+zRbP0lw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
globalConfig = ''
|
globalConfig = ''
|
||||||
|
|
@ -394,7 +394,9 @@ in
|
||||||
requires = [ "mnt-static.mount" ];
|
requires = [ "mnt-static.mount" ];
|
||||||
after = [ "mnt-static.mount" "systemd-tmpfiles-setup.service" ];
|
after = [ "mnt-static.mount" "systemd-tmpfiles-setup.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
EnvironmentFile = "-/etc/caddy/cloudflare.env";
|
# Keep the manually provisioned token outside NixOS-managed /etc.
|
||||||
|
# /var/lib/caddy is persistent across system generations.
|
||||||
|
EnvironmentFile = "/var/lib/caddy/cloudflare.env";
|
||||||
RuntimeDirectory = "caddy";
|
RuntimeDirectory = "caddy";
|
||||||
RuntimeDirectoryMode = "0755";
|
RuntimeDirectoryMode = "0755";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.virtualisation.quadlet) containers networks;
|
inherit (config.virtualisation.quadlet) containers networks;
|
||||||
|
authentikVersion = "2026.5.6";
|
||||||
authentikEnv = config.sops.secrets."containers/authentik.env".path;
|
authentikEnv = config.sops.secrets."containers/authentik.env".path;
|
||||||
outpostEnv = config.sops.secrets."containers/authentik-outpost.env".path;
|
outpostEnv = config.sops.secrets."containers/authentik-outpost.env".path;
|
||||||
in
|
in
|
||||||
|
|
@ -53,7 +54,7 @@ in
|
||||||
|
|
||||||
authentik-server = {
|
authentik-server = {
|
||||||
containerConfig = {
|
containerConfig = {
|
||||||
image = "ghcr.io/goauthentik/server:2026.5.0";
|
image = "ghcr.io/goauthentik/server:${authentikVersion}";
|
||||||
exec = "server";
|
exec = "server";
|
||||||
networks = [ networks.authentik.ref ];
|
networks = [ networks.authentik.ref ];
|
||||||
publishPorts = [
|
publishPorts = [
|
||||||
|
|
@ -65,6 +66,11 @@ in
|
||||||
"/home/imnyang/Docker/authentik/custom-templates:/templates:Z"
|
"/home/imnyang/Docker/authentik/custom-templates:/templates:Z"
|
||||||
];
|
];
|
||||||
environmentFiles = [ authentikEnv ];
|
environmentFiles = [ authentikEnv ];
|
||||||
|
environments = {
|
||||||
|
# Authentik 2026.5 defaults to [::], but hako is reached over IPv4.
|
||||||
|
AUTHENTIK_LISTEN__HTTP = "0.0.0.0:9000";
|
||||||
|
AUTHENTIK_LISTEN__HTTPS = "0.0.0.0:9443";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
|
|
@ -77,7 +83,7 @@ in
|
||||||
|
|
||||||
authentik-worker = {
|
authentik-worker = {
|
||||||
containerConfig = {
|
containerConfig = {
|
||||||
image = "ghcr.io/goauthentik/server:2026.5.0";
|
image = "ghcr.io/goauthentik/server:${authentikVersion}";
|
||||||
exec = "worker";
|
exec = "worker";
|
||||||
user = "root";
|
user = "root";
|
||||||
networks = [ networks.authentik.ref ];
|
networks = [ networks.authentik.ref ];
|
||||||
|
|
@ -85,9 +91,11 @@ in
|
||||||
"/home/imnyang/Docker/authentik/certs:/certs:Z"
|
"/home/imnyang/Docker/authentik/certs:/certs:Z"
|
||||||
"/home/imnyang/Docker/authentik/media:/media:Z"
|
"/home/imnyang/Docker/authentik/media:/media:Z"
|
||||||
"/home/imnyang/Docker/authentik/custom-templates:/templates:Z"
|
"/home/imnyang/Docker/authentik/custom-templates:/templates:Z"
|
||||||
"/var/run/docker.sock:/var/run/docker.sock"
|
|
||||||
];
|
];
|
||||||
environmentFiles = [ authentikEnv ];
|
environmentFiles = [ authentikEnv ];
|
||||||
|
environments = {
|
||||||
|
AUTHENTIK_LISTEN__HTTP = "0.0.0.0:9000";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
|
|
@ -100,7 +108,7 @@ in
|
||||||
|
|
||||||
authentik-outpost-ldap = {
|
authentik-outpost-ldap = {
|
||||||
containerConfig = {
|
containerConfig = {
|
||||||
image = "ghcr.io/goauthentik/ldap:2026.5.0";
|
image = "ghcr.io/goauthentik/ldap:${authentikVersion}";
|
||||||
entrypoint = [ "/ldap" ];
|
entrypoint = [ "/ldap" ];
|
||||||
user = "1000";
|
user = "1000";
|
||||||
networks = [ networks.authentik.ref ];
|
networks = [ networks.authentik.ref ];
|
||||||
|
|
@ -109,6 +117,15 @@ in
|
||||||
"636:6636"
|
"636:6636"
|
||||||
];
|
];
|
||||||
environmentFiles = [ outpostEnv ];
|
environmentFiles = [ outpostEnv ];
|
||||||
|
environments = {
|
||||||
|
# Keep the outpost-to-core API traffic on the private Podman network.
|
||||||
|
# The public hostname resolves through Cloudflare and hairpins back
|
||||||
|
# through the reverse proxy, which currently returns 502 from hako.
|
||||||
|
AUTHENTIK_HOST = "http://authentik-server:9000";
|
||||||
|
AUTHENTIK_INSECURE = "true";
|
||||||
|
AUTHENTIK_LISTEN__LDAP = "0.0.0.0:3389";
|
||||||
|
AUTHENTIK_LISTEN__LDAPS = "0.0.0.0:6636";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue