X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fwebsites%2Fdefault.nix;h=4b21efb75eb386e97a42068313080d132e29cf05;hp=e57f505a86fae43fc3b523c5f9210db6b82a7895;hb=17f6eae9907a122d4472da727ae8b1ac1c40c027;hpb=f33aade75160a345a721fd60451b9edaa4d10e44 diff --git a/modules/websites/default.nix b/modules/websites/default.nix index e57f505..4b21efb 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: