summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-18 15:22:27 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-18 15:22:27 +0200
commit0fd5d1eb58124b4eef8dd9749c0eac28503ae08f (patch)
tree5b1098ddcecede1657276fee755b552c38440ccb
parent94edfe8c7b2f83650c0f6262e50063ebcdedf29d (diff)
downloadutils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar
utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar.gz
utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar.bz2
utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar.xz
utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.zip
cleanup
-rw-r--r--nix/module.nix16
1 files changed, 9 insertions, 7 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 3263401..20c10a1 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -29,13 +29,15 @@ let
29 dirService = dCfg: nameValuePair ("rolling-directory@" + escapeSystemdPath dCfg.path) { 29 dirService = dCfg: nameValuePair ("rolling-directory@" + escapeSystemdPath dCfg.path) {
30 wantedBy = [ "multi-user.target" ]; 30 wantedBy = [ "multi-user.target" ];
31 31
32 serviceConfig = { 32 path = with pkgs; [ rolling-directory ];
33 ExecStart = let 33
34 extraArgs = optionals (dCfg.monitorTimeout != null) ["-t" (toString dCfg.monitorTimeout)] 34 script = let
35 + optionals (dCfg.minSleep != null) ["-s" (toString dCfg.minSleep)]; 35 args = [ dCfg.path dCfg.maxSize "monitor" ]
36 in '' 36 + optionals (dCfg.monitorTimeout != null) ["-t" dCfg.monitorTimeout]
37 ${pkgs.rolling-directory}/bin/rolling-directory %I ${toString dCfg.maxSize} monitor ${escapeShellArgs extraArgs} 37 + optionals (dCfg.minSleep != null) ["-s" dCfg.minSleep];
38 ''; 38 in ''
39 exec -- rolling-directory ${escapeShellArgs args}
40 '';
39 }; 41 };
40 }; 42 };
41in { 43in {