feat: run rebuilds from /run/site-rebuild/ dir

This commit is contained in:
Lewis Wynne 2026-04-07 16:24:35 +01:00
parent 0ce233b7ca
commit 216e97a10d

View file

@ -175,13 +175,14 @@ in
id = "${name}-rebuild";
execute-command = "/run/current-system/sw/bin/touch";
pass-arguments-to-command = [
{ source = "string"; name = "${site.dataDir}/trigger"; }
{ source = "string"; name = "/run/site-rebuild/${name}"; }
];
}) cfg;
hooksFile = pkgs.writeText "site-hooks.json" (builtins.toJSON allHooks);
in "${pkgs.webhook}/bin/webhook -hooks ${hooksFile} -port ${toString webhookPort} -verbose";
Restart = "always";
DynamicUser = true;
RuntimeDirectory = "site-rebuild";
};
};
}]);
@ -191,7 +192,7 @@ in
description = "Watch for ${name} rebuild trigger";
wantedBy = [ "multi-user.target" ];
pathConfig = {
PathModified = "${site.dataDir}/trigger";
PathModified = "/run/site-rebuild/${name}";
Unit = "${name}-rebuild.service";
};
};