core: reload caddy instead of always restarting

when config file changes
This commit is contained in:
teutat3s 2023-03-16 11:49:36 +01:00
parent 5b1f2dcc23
commit b9031dbd7c
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -55,6 +55,11 @@ in {
++ lib.optionals cfg.enableHelp ["help.local"]; ++ lib.optionals cfg.enableHelp ["help.local"];
}; };
# Changing the Caddyfile should only trigger a reload, not a restart
systemd.services.caddy.reloadTriggers = [
config.services.caddy.configFile
];
# Caddy reverse proxy for local services like cups # Caddy reverse proxy for local services like cups
services.caddy = { services.caddy = {
enable = cfg.enableCaddy; enable = cfg.enableCaddy;