glauth: Working

This commit is contained in:
kat witch 2021-09-05 00:03:41 +01:00
parent a1d46f5301
commit acfa259b2a
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
4 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,10 @@
{ config, tf, lib, ... }: with lib; {
network.firewall.public.tcp.ports = singleton 3984;
network.extraCerts.domain-auth = "auth.${config.network.dns.domain}";
users.groups.domain-auth.members = [ "nginx" "glauth" ];
security.acme.certs.domain-auth.group = "domain-auth";
services.glauth = {
enable = true;
configFile = config.secrets.files.glauth-config-file.path;
@ -19,8 +23,8 @@
ldaps = {
enabled = true;
listen = "0.0.0.0:3894";
cert = "/var/lib/acme/auth.kittywit.ch/fullchain.pem";
key = "/var/lib/acme/auth.kittywit.ch/key.pem";
cert = "/var/lib/acme/domain-auth/fullchain.pem";
key = "/var/lib/acme/domain-auth/key.pem";
};
backend = {
baseDN = "dc=kittywitch,dc=com";

View file

@ -29,7 +29,7 @@
};
services.nginx.virtualHosts."auth.${config.network.dns.domain}" = {
enableACME = true;
useACMEHost = "domain-auth";
forceSSL = true;
locations = { "/".proxyPass = "http://127.0.0.1:8089"; };
};