summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/fetchWallpaper.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix
index b5eb00e9c..83ecf4177 100644
--- a/krebs/3modules/fetchWallpaper.nix
+++ b/krebs/3modules/fetchWallpaper.nix
@@ -37,11 +37,10 @@ let
fetchWallpaperScript = pkgs.writeScript "fetchWallpaper" ''
#! ${pkgs.bash}/bin/bash
- ${if (cfg.predicate == null) then "" else ''
- ${cfg.predicate}
- if [ $? -ne 0 ]; then
- echo "predicate failed"
- exit 23
+ ${optionalString (cfg.predicate != null) ''
+ if ! ${cfg.predicate}; then
+ echo "predicate failed - will not fetch from remote"
+ exit 0
fi
''}
mkdir -p ${shell.escape cfg.stateDir}