From 17c76ec7b1f529755fcb4b0c51f2a809b290a6db Mon Sep 17 00:00:00 2001 From: teutat3s Date: Thu, 13 Jul 2023 21:06:01 +0200 Subject: [PATCH] caddy: use module from latest to enable gracefully reloading upon config change instead of restarting --- hosts/flora-6/caddy.nix | 10 ++++------ hosts/flora-6/flora-6.nix | 2 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hosts/flora-6/caddy.nix b/hosts/flora-6/caddy.nix index 8d00284e..c76da453 100644 --- a/hosts/flora-6/caddy.nix +++ b/hosts/flora-6/caddy.nix @@ -5,11 +5,6 @@ self, ... }: { - # Changing the Caddyfile should only trigger a reload, not a restart - systemd.services.caddy.reloadTriggers = [ - config.services.caddy.configFile - ]; - systemd.tmpfiles.rules = [ "d '/data/srv/www/os/download/' 0750 hakkonaut hakkonaut - -" ]; @@ -18,7 +13,10 @@ enable = lib.mkForce true; group = "hakkonaut"; email = "admins@pub.solar"; - globalConfig = lib.mkForce ""; + enableReload = true; + globalConfig = lib.mkForce '' + grace_period 60s + ''; virtualHosts = { "pub.solar" = { logFormat = lib.mkForce '' diff --git a/hosts/flora-6/flora-6.nix b/hosts/flora-6/flora-6.nix index 59df45c1..34be1199 100644 --- a/hosts/flora-6/flora-6.nix +++ b/hosts/flora-6/flora-6.nix @@ -27,9 +27,11 @@ in { profiles.users.barkeeper "${latestModulesPath}/services/misc/gitea.nix" + "${latestModulesPath}/services/web-servers/caddy/default.nix" ]; disabledModules = [ "services/misc/gitea.nix" + "services/web-servers/caddy/default.nix" ]; config = {