feat: run rebuilds from /run/site-rebuild/ dir
This commit is contained in:
parent
0ce233b7ca
commit
216e97a10d
1 changed files with 3 additions and 2 deletions
|
|
@ -175,13 +175,14 @@ in
|
||||||
id = "${name}-rebuild";
|
id = "${name}-rebuild";
|
||||||
execute-command = "/run/current-system/sw/bin/touch";
|
execute-command = "/run/current-system/sw/bin/touch";
|
||||||
pass-arguments-to-command = [
|
pass-arguments-to-command = [
|
||||||
{ source = "string"; name = "${site.dataDir}/trigger"; }
|
{ source = "string"; name = "/run/site-rebuild/${name}"; }
|
||||||
];
|
];
|
||||||
}) cfg;
|
}) cfg;
|
||||||
hooksFile = pkgs.writeText "site-hooks.json" (builtins.toJSON allHooks);
|
hooksFile = pkgs.writeText "site-hooks.json" (builtins.toJSON allHooks);
|
||||||
in "${pkgs.webhook}/bin/webhook -hooks ${hooksFile} -port ${toString webhookPort} -verbose";
|
in "${pkgs.webhook}/bin/webhook -hooks ${hooksFile} -port ${toString webhookPort} -verbose";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
RuntimeDirectory = "site-rebuild";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}]);
|
}]);
|
||||||
|
|
@ -191,7 +192,7 @@ in
|
||||||
description = "Watch for ${name} rebuild trigger";
|
description = "Watch for ${name} rebuild trigger";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
pathConfig = {
|
pathConfig = {
|
||||||
PathModified = "${site.dataDir}/trigger";
|
PathModified = "/run/site-rebuild/${name}";
|
||||||
Unit = "${name}-rebuild.service";
|
Unit = "${name}-rebuild.service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue