authelia: revert do not use dots in systemd service name

The issue is the fqdn is used to setup the nginx virtual host
This commit is contained in:
ibizaman 2026-01-07 23:45:45 +01:00
parent e3ed7cd976
commit 3ed7cb112f
3 changed files with 3 additions and 6 deletions

View file

@ -11,7 +11,7 @@ let
cfg = config.shb.authelia; cfg = config.shb.authelia;
opt = options.shb.authelia; opt = options.shb.authelia;
fqdn = builtins.replaceStrings [ "." ] [ "_" ] "${cfg.subdomain}.${cfg.domain}"; fqdn = "${cfg.subdomain}.${cfg.domain}";
fqdnWithPort = if isNull cfg.port then fqdn else "${fqdn}:${toString cfg.port}"; fqdnWithPort = if isNull cfg.port then fqdn else "${fqdn}:${toString cfg.port}";
autheliaCfg = config.services.authelia.instances.${fqdn}; autheliaCfg = config.services.authelia.instances.${fqdn};

View file

@ -133,7 +133,7 @@ in
def tests(): def tests():
machine.wait_for_unit("lldap.service") machine.wait_for_unit("lldap.service")
machine.wait_for_unit("authelia-authelia_machine_com.target") machine.wait_for_unit("authelia-authelia.machine.com.target")
machine.wait_for_open_port(9091) machine.wait_for_open_port(9091)
endpoints = json.loads(machine.succeed("curl -s http://machine.com/.well-known/openid-configuration")) endpoints = json.loads(machine.succeed("curl -s http://machine.com/.well-known/openid-configuration"))

View file

@ -75,9 +75,7 @@ let
'' ''
+ lib.strings.concatMapStrings (s: ''server.wait_for_unit("${s}")'' + "\n") ( + lib.strings.concatMapStrings (s: ''server.wait_for_unit("${s}")'' + "\n") (
waitForServices args waitForServices args
++ (lib.optionals autheliaEnabled [ ++ (lib.optionals autheliaEnabled [ "authelia-auth.${cfg.domain}.service" ])
"authelia-auth_${builtins.replaceStrings [ "." ] [ "_" ] cfg.domain}.service"
])
++ (lib.optionals lldapEnabled [ "lldap.service" ]) ++ (lib.optionals lldapEnabled [ "lldap.service" ])
) )
+ lib.strings.concatMapStrings (p: ''server.wait_for_open_port(${toString p})'' + "\n") ( + lib.strings.concatMapStrings (p: ''server.wait_for_open_port(${toString p})'' + "\n") (
@ -232,7 +230,6 @@ in
baseImports baseImports
../modules/blocks/hardcodedsecret.nix ../modules/blocks/hardcodedsecret.nix
../modules/blocks/nginx.nix ../modules/blocks/nginx.nix
../modules/blocks/postgresql.nix
]; ];
config = { config = {
# HTTP(s) server port. # HTTP(s) server port.