diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-18 15:22:27 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-18 15:22:27 +0200 |
commit | 0fd5d1eb58124b4eef8dd9749c0eac28503ae08f (patch) | |
tree | 5b1098ddcecede1657276fee755b552c38440ccb /nix | |
parent | 94edfe8c7b2f83650c0f6262e50063ebcdedf29d (diff) | |
download | utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar.gz utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar.bz2 utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.tar.xz utils-0fd5d1eb58124b4eef8dd9749c0eac28503ae08f.zip |
cleanup
Diffstat (limited to 'nix')
-rw-r--r-- | nix/module.nix | 16 |
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 | }; |
41 | in { | 43 | in { |