From 286d67878503cf05cb5d5d06660f59a1549ded09 Mon Sep 17 00:00:00 2001
From: Cornelius Mika <cornelius.mika@gmail.com>
Date: Wed, 23 Aug 2017 17:43:46 +0200
Subject: [PATCH] systemd: don't fail on activation when services changed

The diff command exits with status 1 when detecting differences.
Because of 'set -e', this caused the activation to fail.
---
 modules/systemd.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/systemd.nix b/modules/systemd.nix
index edc89ab0c..b68034b70 100644
--- a/modules/systemd.nix
+++ b/modules/systemd.nix
@@ -147,7 +147,7 @@ in
             --old-line-format='-%L' \
             --unchanged-line-format=' %L' \
             "$oldServiceFiles" "$newServiceFiles" \
-            > $servicesDiffFile
+            > $servicesDiffFile || true
 
           local -a maybeRestart=( $(grep '^ ' $servicesDiffFile | cut -c2-) )
           local -a toStop=( $(grep '^-' $servicesDiffFile | cut -c2-) )