Fix laminar config to set timeouts correctly
This commit is contained in:
parent
5426a03796
commit
c4c8220854
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
cfgDir = "${stateDir}/cfg";
|
cfgDir = "${stateDir}/cfg";
|
||||||
cfg = config.services.laminar;
|
cfg = config.services.laminar;
|
||||||
mkTimeoutConf = run_name: {"${lib.removeSuffix ".run" run_name}.conf" = builtins.toFile "timeout.conf" "TIMEOUT=10800";};
|
mkTimeoutConf = run_name: {"${lib.removeSuffix ".run" run_name}.conf" = builtins.toFile "timeout.conf" "TIMEOUT=10800";};
|
||||||
addTimeouts = cfg_files: builtins.zipAttrsWith (throw "Job has config file and we attempted to set a TIMEOUT.") ([cfg_files] ++ map mkTimeoutConf (builtins.filter (lib.hasSuffix ".run") (lib.attrNames cfg_files)));
|
addTimeouts = cfg_files: cfg_files // {jobs = lib.foldr lib.mergeAttrs cfg_files.jobs (map mkTimeoutConf (builtins.filter (lib.hasSuffix ".run") (lib.attrNames cfg_files.jobs)));};
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
services.laminar = {
|
services.laminar = {
|
||||||
|
@ -77,7 +77,7 @@ in {
|
||||||
LimitNOFILE = "1024000";
|
LimitNOFILE = "1024000";
|
||||||
};
|
};
|
||||||
after = ["network.target"];
|
after = ["network.target"];
|
||||||
preStart = "ln -sfT ${pkgs.setToDirectories cfg.cfgFiles} ${cfgDir}";
|
preStart = "ln -sfT ${pkgs.setToDirectories (addTimeouts cfg.cfgFiles)} ${cfgDir}";
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
nginx = {
|
nginx = {
|
||||||
|
|
Loading…
Reference in a new issue