module: restart services if global config file changes

This commit is contained in:
WilliButz 2023-06-07 14:13:02 +02:00
parent 3c661c5095
commit e079fe0719
No known key found for this signature in database
GPG key ID: FB0513677AB15BEA

View file

@ -78,6 +78,7 @@ in
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
before = [ "authentik.service" ];
restartTriggers = [ config.environment.etc."authentik/config.yml".source ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
@ -89,6 +90,7 @@ in
authentik-worker = {
requiredBy = [ "authentik.service" ];
before = [ "authentik.service" ];
restartTriggers = [ config.environment.etc."authentik/config.yml".source ];
serviceConfig = {
RuntimeDirectory = "authentik";
WorkingDirectory = "%t/authentik";
@ -105,6 +107,7 @@ in
"postgresql.service"
"redis-authentik.service"
];
restartTriggers = [ config.environment.etc."authentik/config.yml".source ];
preStart = ''
ln -svf ${pkgs.authentik.staticWorkdirDeps}/* /var/lib/authentik/
'';