Authentik apps
This commit is contained in:
@@ -4,11 +4,12 @@ let
|
|||||||
serverCfg = config.syscfg.server;
|
serverCfg = config.syscfg.server;
|
||||||
authentikData = builder.mkData {
|
authentikData = builder.mkData {
|
||||||
name = "authentik"; dir = "authentik"; vars = {
|
name = "authentik"; dir = "authentik"; vars = {
|
||||||
NEXTCLOUD_DOMAIN = "${serverCfg.containers.nextcloud.subdomain or "nextcloud"}.${serverCfg.hostDomain}";
|
|
||||||
AUTHENTIK_DOMAIN = "${containerCfg.subdomain}.${serverCfg.hostDomain}";
|
AUTHENTIK_DOMAIN = "${containerCfg.subdomain}.${serverCfg.hostDomain}";
|
||||||
COOKIE_DOMAIN = "${serverCfg.hostDomain}";
|
COOKIE_DOMAIN = "${serverCfg.hostDomain}";
|
||||||
AUTHENTIK_LDAP_DC_DOMAIN = "dc=ldap," + (lib.concatMapStringsSep "," (x: "dc=${x}") (lib.splitString "." serverCfg.hostDomain));
|
AUTHENTIK_LDAP_DC_DOMAIN = "dc=ldap," + (lib.concatMapStringsSep "," (x: "dc=${x}") (lib.splitString "." serverCfg.hostDomain));
|
||||||
};
|
}
|
||||||
|
// (if serverCfg.containers?jellyfin then { JELLYFIN_DOMAIN = "${serverCfg.containers.jellyfin.subdomain}.${serverCfg.hostDomain}";} else {})
|
||||||
|
// (if serverCfg.containers?nextcloud then { NEXTCLOUD_DOMAIN = "${serverCfg.containers.nextcloud.subdomain}.${serverCfg.hostDomain}";} else {});
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
sops = true;
|
sops = true;
|
||||||
@@ -82,7 +83,7 @@ in {
|
|||||||
secret = name;
|
secret = name;
|
||||||
extraEnv = {
|
extraEnv = {
|
||||||
AUTHENTIK_HOST = "https://${containerCfg.subdomain}.${serverCfg.hostDomain}";
|
AUTHENTIK_HOST = "https://${containerCfg.subdomain}.${serverCfg.hostDomain}";
|
||||||
AUTHENTIK_HOST_INSECURE = "false";
|
AUTHENTIK_INSECURE = "false";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -96,6 +97,8 @@ in {
|
|||||||
$AK apply_blueprint /blueprints/custom/authentik.yaml
|
$AK apply_blueprint /blueprints/custom/authentik.yaml
|
||||||
$AK apply_blueprint /blueprints/custom/traefik.yaml
|
$AK apply_blueprint /blueprints/custom/traefik.yaml
|
||||||
$AK apply_blueprint /blueprints/custom/ldap.yaml
|
$AK apply_blueprint /blueprints/custom/ldap.yaml
|
||||||
|
|
||||||
|
${lib.optionalString (serverCfg.containers ? jellyfin) ''$AK apply_blueprint /blueprints/custom/jellyfin.yaml''}
|
||||||
${lib.optionalString (serverCfg.containers ? nextcloud) ''$AK apply_blueprint /blueprints/custom/nextcloud.yaml''}
|
${lib.optionalString (serverCfg.containers ? nextcloud) ''$AK apply_blueprint /blueprints/custom/nextcloud.yaml''}
|
||||||
|
|
||||||
echo "Completed Authentik Setup"
|
echo "Completed Authentik Setup"
|
||||||
|
|||||||
15
modules/server/containers/data/authentik/jellyfin.yaml
Normal file
15
modules/server/containers/data/authentik/jellyfin.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
version: 1
|
||||||
|
metadata:
|
||||||
|
name: jellyfin-ldap-setup
|
||||||
|
entries:
|
||||||
|
- model: authentik_core.application
|
||||||
|
id: jellyfin-app
|
||||||
|
identifiers:
|
||||||
|
slug: jellyfin
|
||||||
|
attrs:
|
||||||
|
name: Jellyfin
|
||||||
|
provider:
|
||||||
|
!Find [authentik_providers_ldap.ldapprovider, [name, ldap-provider]]
|
||||||
|
open_in_new_tab: false
|
||||||
|
launch_url: "@JELLYFIN_DOMAIN@"
|
||||||
|
state: present
|
||||||
@@ -9,10 +9,7 @@ entries:
|
|||||||
base_dn: "@AUTHENTIK_LDAP_DC_DOMAIN@"
|
base_dn: "@AUTHENTIK_LDAP_DC_DOMAIN@"
|
||||||
search_group: null
|
search_group: null
|
||||||
authorization_flow:
|
authorization_flow:
|
||||||
!Find [
|
!Find [authentik_flows.flow, [slug, default-authentication-flow]]
|
||||||
authentik_flows.flow,
|
|
||||||
[slug, default-provider-authorization-implicit-consent],
|
|
||||||
]
|
|
||||||
invalidation_flow:
|
invalidation_flow:
|
||||||
!Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
!Find [authentik_flows.flow, [slug, default-provider-invalidation-flow]]
|
||||||
|
|
||||||
|
|||||||
@@ -86,3 +86,4 @@ entries:
|
|||||||
provider:
|
provider:
|
||||||
!Find [authentik_providers_saml.samlprovider, [name, Nextcloud SAML]]
|
!Find [authentik_providers_saml.samlprovider, [name, Nextcloud SAML]]
|
||||||
group: "Cloud Services"
|
group: "Cloud Services"
|
||||||
|
launch_url: "@NEXTCLOUD_DOMAIN@"
|
||||||
|
|||||||
Reference in New Issue
Block a user