X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fwebsites%2Fdefault.nix;h=4b21efb75eb386e97a42068313080d132e29cf05;hb=06782a203fa0ed5ab29a03c96294f138209211da;hp=e57f505a86fae43fc3b523c5f9210db6b82a7895;hpb=24fd1fe6c62b7a9fc347794fde043285da272f5c;p=perso%2FImmae%2FConfig%2FNix%2FNUR.git diff --git a/modules/websites/default.nix b/modules/websites/default.nix index e57f505a..4b21efb7 100644 --- a/modules/websites/default.nix +++ b/modules/websites/default.nix @@ -91,6 +91,13 @@ in }; }); }; + watchPaths = mkOption { + type = listOf string; + default = []; + description = '' + Paths to watch that should trigger a reload of httpd + ''; + }; }; }); }; @@ -159,6 +166,13 @@ in }) ) cfg; + config.services.filesWatcher = attrsets.mapAttrs' (name: icfg: attrsets.nameValuePair + "httpd${icfg.httpdName}" { + paths = icfg.watchPaths; + waitTime = 5; + } + ) cfg; + config.security.acme.certs = let typesToManage = attrsets.filterAttrs (k: v: v.enable) cfg; flatVhosts = lists.flatten (attrsets.mapAttrsToList (k: v: