infra: auto reset password of public user

This commit is contained in:
Johannes Jöns 2024-07-12 13:36:13 +02:00
parent 184a43c3df
commit 45210bc514

View file

@ -30,6 +30,28 @@ in
}; };
}; };
systemd.services.public-pw-reset = {
enable = true;
description = "Rest Public Password";
serviceConfig = {
User = "root";
script = ''
/root/fixpw.sh
'';
};
};
systemd.timers..public-pw-reset = {
enable = true;
description = "Rest Public Password";
wants = [ "public-pw-reset.services" ];
wantedBy = [ "multi-user.target" ];
timerConfig = {
OnBootSec= "0min";
OnCalendar = "*:0/1";
};
};
services.postgresql = { services.postgresql = {
enable = true; enable = true;
ensureDatabases = [ user ]; ensureDatabases = [ user ];