lldap nginx config
This commit is contained in:
parent
eafd0289a0
commit
1e24392601
2 changed files with 19 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
cfg = import ./vars.nix;
|
||||
#web_port = "17170";
|
||||
port = cfg.lldap.webPort;
|
||||
domain = cfg.lldap.domain;
|
||||
in
|
||||
{
|
||||
|
|
@ -22,8 +22,9 @@ in
|
|||
environment = {
|
||||
TZ = "Europe/Berlin";
|
||||
UID = "389";
|
||||
GID = "389";
|
||||
LLDAP_VERBOSE = "true";
|
||||
LLDAP_LDAP_BASE_DN = "dc=mc-fucker,cd=cool";
|
||||
LLDAP_LDAP_BASE_DN = "dc=mc-fucker,dc=cool";
|
||||
LLDAP_LDAP_USER_DN = "ldapadmin";
|
||||
LLDAP_HTTP_URL = "https://${domain}";
|
||||
LLDAP_JWT_SECRET_FILE = config.sops.secrets."lldap/jwt".path;
|
||||
|
|
@ -36,14 +37,27 @@ in
|
|||
};
|
||||
ports = [
|
||||
"389:3890"
|
||||
"17170:17170"
|
||||
"${port}:${port}"
|
||||
];
|
||||
extraOptions = cfg.podman.extraOptions;
|
||||
volumes = [
|
||||
"${config.sops.secrets."lldap/jwt".path}:${config.sops.secrets."lldap/jwt".path}:ro"
|
||||
"${config.sops.secrets."lldap/admin".path}:${config.sops.secrets."lldap/admin".path}:ro"
|
||||
"/var/lib/lldap:/data"
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${port}";
|
||||
};
|
||||
extraConfig = ''
|
||||
access_log /var/log/nginx/${domain}_access.log;
|
||||
error_log /var/log/nginx/${domain}_error.log;
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
# vim: set et ts=2 sw=2 ai:
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@
|
|||
};
|
||||
|
||||
lldap = {
|
||||
domain = "lldap.mc-fucker.cool";
|
||||
domain = "user.mc-fucker.cool";
|
||||
webPort = "17170";
|
||||
};
|
||||
|
||||
mail = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue