use secret files
This commit is contained in:
parent
2fa576a302
commit
e3a9a391c2
2 changed files with 17 additions and 7 deletions
|
|
@ -19,15 +19,24 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
users.groups.authentik-ldap = {};
|
||||||
|
users.users.authentik-ldap = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "authentik-ldap";
|
||||||
|
};
|
||||||
|
systemd.services.authentik-ldap.serviceConfig = {
|
||||||
|
DynamicUser = lib.mkForce false;
|
||||||
|
User = "authentik-ldap";
|
||||||
|
};
|
||||||
services.authentik-ldap = {
|
services.authentik-ldap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environmentFile = "/var/lib/authentik-ldap-env";
|
environmentFile = config.sops.secrets."auth/ldap-env-file".path;
|
||||||
|
# environmentFile = "/var/lib/authentik-ldap-env";
|
||||||
};
|
};
|
||||||
services.authentik = {
|
services.authentik = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# The environmentFile needs to be on the target host!
|
# environmentFile = "/var/lib/authentik_secret";
|
||||||
# Best use something like sops-nix or agenix to manage it
|
environmentFile = config.sops.secrets."auth/env-file".path;
|
||||||
environmentFile = "/var/lib/authentik_secret";
|
|
||||||
settings = {
|
settings = {
|
||||||
email = {
|
email = {
|
||||||
host = "mail.${config.networking.domain}";
|
host = "mail.${config.networking.domain}";
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,9 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
bind = {
|
bind = {
|
||||||
# dn = "cn=dovecot,ou=users,DC=test,DC=htw,DC=stura-dresden,DC=de";
|
# dn = "cn=dovecot,ou=users,DC=test,DC=htw,DC=stura-dresden,DC=de";
|
||||||
dn = "cn=ldapuser,ou=users,dc=ldap,dc=goauthentik,dc=io";
|
dn = "cn=mail,ou=users,dc=mail,dc=htw,dc=stura-dresden,dc=de";
|
||||||
passwordFile = "/var/lib/dovecot_ldap_passwd";
|
# passwordFile = "/var/lib/dovecot_ldap_passwd";
|
||||||
|
passwordFile = config.sops.secrets.ldap_passwd.path;
|
||||||
};
|
};
|
||||||
dovecot = {
|
dovecot = {
|
||||||
userFilter = "(&(objectClass=posixAccount)(mail=%u))";
|
userFilter = "(&(objectClass=posixAccount)(mail=%u))";
|
||||||
|
|
@ -117,7 +118,7 @@ in
|
||||||
uidAttribute = "cn";
|
uidAttribute = "cn";
|
||||||
};
|
};
|
||||||
#searchBase = "DC=test,DC=htw,DC=stura-dresden,DC=de";
|
#searchBase = "DC=test,DC=htw,DC=stura-dresden,DC=de";
|
||||||
searchBase = "DC=ldap,DC=goauthentik,DC=io";
|
searchBase = "dc=mail,dc=htw,dc=stura-dresden,dc=de";
|
||||||
uris = [
|
uris = [
|
||||||
"ldap://auth.test.htw.stura-dresden.de:3389"
|
"ldap://auth.test.htw.stura-dresden.de:3389"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue