diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-18 12:18:35 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-18 12:18:35 +0200 |
commit | 7dc2c481c6617f8f09167f8ea4bd412206e9ad86 (patch) | |
tree | 8b3609936f2872439133215dafafca84261f59d7 | |
parent | 4ca83979f0ca069bc7d984255f8671495f38877f (diff) | |
download | nixos-7dc2c481c6617f8f09167f8ea4bd412206e9ad86.tar nixos-7dc2c481c6617f8f09167f8ea4bd412206e9ad86.tar.gz nixos-7dc2c481c6617f8f09167f8ea4bd412206e9ad86.tar.bz2 nixos-7dc2c481c6617f8f09167f8ea4bd412206e9ad86.tar.xz nixos-7dc2c481c6617f8f09167f8ea4bd412206e9ad86.zip |
massage systemd units
-rw-r--r-- | custom/borgbackup.nix | 2 | ||||
-rw-r--r-- | custom/unit-status-mail.nix | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix index a10f6590..dc40c652 100644 --- a/custom/borgbackup.nix +++ b/custom/borgbackup.nix | |||
@@ -141,7 +141,7 @@ in { | |||
141 | ${tCfg.repo}::${cfg.prefix}$1-{utcnow} | 141 | ${tCfg.repo}::${cfg.prefix}$1-{utcnow} |
142 | ''; | 142 | ''; |
143 | in if tCfg.lock == null then borgCmd else "flock -xo /var/lock/${tCfg.lock} ${borgCmd}"; | 143 | in if tCfg.lock == null then borgCmd else "flock -xo /var/lock/${tCfg.lock} ${borgCmd}"; |
144 | scriptArgs = "%I"; | 144 | scriptArgs = if cfg.snapshots == "lvm" then "%I" else "%i"; |
145 | 145 | ||
146 | unitConfig = { | 146 | unitConfig = { |
147 | AssertPathIsDirectory = mkIf (tCfg.lock != null) "/var/lock"; | 147 | AssertPathIsDirectory = mkIf (tCfg.lock != null) "/var/lock"; |
diff --git a/custom/unit-status-mail.nix b/custom/unit-status-mail.nix index 39706c2e..eae03594 100644 --- a/custom/unit-status-mail.nix +++ b/custom/unit-status-mail.nix | |||
@@ -34,7 +34,7 @@ in { | |||
34 | serviceConfig = { | 34 | serviceConfig = { |
35 | Type = "oneshot"; | 35 | Type = "oneshot"; |
36 | }; | 36 | }; |
37 | scriptArgs = "\"%I\" \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\""; | 37 | scriptArgs = "\"%i\" \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\""; |
38 | path = with pkgs; [nettools]; | 38 | path = with pkgs; [nettools]; |
39 | script = '' | 39 | script = '' |
40 | #!${pkgs.stdenv.shell} | 40 | #!${pkgs.stdenv.shell} |
@@ -54,7 +54,7 @@ in { | |||
54 | 54 | ||
55 | Status report for unit: $UNIT | 55 | Status report for unit: $UNIT |
56 | $EXTRA | 56 | $EXTRA |
57 | $(systemctl status $UNIT) | 57 | $(systemctl status --lines=1000 --full $UNIT) |
58 | EOF | 58 | EOF |
59 | ''; | 59 | ''; |
60 | }; | 60 | }; |