nixos: services: nginx: sso: align with upstream

This aligns with the PR I opened on nixpkgs [1].

[1]: https://github.com/NixOS/nixpkgs/pull/325838
This commit is contained in:
Bruno BELANYI 2024-09-04 12:07:33 +02:00
parent 1fc0d5b08e
commit c42390ba37

View file

@ -59,15 +59,10 @@ in
StateDirectory = "nginx-sso"; StateDirectory = "nginx-sso";
WorkingDirectory = "/var/lib/nginx-sso"; WorkingDirectory = "/var/lib/nginx-sso";
# The files to be merged might not have the correct permissions # The files to be merged might not have the correct permissions
ExecStartPre = ''+${pkgs.writeShellScript "merge-nginx-sso-config" '' ExecStartPre = pkgs.writeShellScript "merge-nginx-sso-config" ''
rm -f '${confPath}' rm -f '${confPath}'
${utils.genJqSecretsReplacementSnippet cfg.configuration confPath} ${utils.genJqSecretsReplacementSnippet cfg.configuration confPath}
'';
# Fix permissions
chown nginx-sso:nginx-sso ${confPath}
chmod 0600 ${confPath}
''
}'';
ExecStart = lib.mkForce '' ExecStart = lib.mkForce ''
${lib.getExe pkg} \ ${lib.getExe pkg} \
--config ${confPath} \ --config ${confPath} \