Use snakeoil certs for postgresql #69

Merged
oysteikt merged 2 commits from fix-postgresql-certs into main 2024-08-26 20:43:34 +02:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 210938296a - Show all commits

View File

@ -50,7 +50,7 @@ in
serviceConfig.Type = "oneshot";
script = let
openssl = lib.getExe pkgs.openssl;
in lib.concatMapStringsSep "\n----------------\n" ({ name, value }: ''
in lib.concatMapStringsSep "\n" ({ name, value }: ''
mkdir -p $(dirname "${value.certificate}") $(dirname "${value.certificateKey}")
if ! ${openssl} x509 -checkend 86400 -noout -in ${value.certificate}
then
@ -69,6 +69,8 @@ in
chown "${value.owner}:${value.group}" "${value.certificateKey}"
chmod "${value.mode}" "${value.certificate}"
chmod "${value.mode}" "${value.certificateKey}"
echo "\n-----------------\n"
'') (lib.attrsToList cfg);
};
systemd.timers."generate-snakeoil-certs" = {