nixos/strichliste: fix stale cache on config change

This commit is contained in:
Micha Ober
2026-06-16 23:24:00 +02:00
parent 6cec788e01
commit a17b5e97d4
+11 -11
View File
@@ -478,20 +478,15 @@ in
inherit (cfg) environment;
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
User = "strichliste";
Group = "strichliste";
EnvironmentFile = cfg.environmentFiles;
ExecStart = map toString [
[
(lib.getExe cfg.packages.backend)
"cache:clear"
]
[
(lib.getExe cfg.packages.backend)
"doctrine:migrations:migrate"
"--allow-no-migration"
"--no-interaction"
]
ExecStart = toString [
(lib.getExe cfg.packages.backend)
"doctrine:migrations:migrate"
"--allow-no-migration"
"--no-interaction"
];
};
};
@@ -499,6 +494,11 @@ in
systemd.services.phpfpm-strichliste = {
inherit (cfg) environment;
serviceConfig.EnvironmentFile = cfg.environmentFiles;
restartTriggers = [ settingsFile ];
preStart = toString [
(lib.getExe cfg.packages.backend)
"cache:clear"
];
};
services.phpfpm.pools.strichliste = {