summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/fetchWallpaper.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-06 17:17:07 +0200
committertv <tv@krebsco.de>2016-06-06 17:17:07 +0200
commitdda2887e2cf618a7c7744bee2eed806e3a38fe36 (patch)
tree19ad3210a2b8485ac22d26f75b2e2493d3f61596 /krebs/3modules/fetchWallpaper.nix
parentc1c645b545b960eb639fc6d41dfa35ee187ae164 (diff)
parent7e344c0627a266685ef1ad79f5193b4e7ba27408 (diff)
Merge remote-tracking branch 'cloudkrebs/master'
Diffstat (limited to 'krebs/3modules/fetchWallpaper.nix')
-rw-r--r--krebs/3modules/fetchWallpaper.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix
index 53fe0839d..0adcec3d8 100644
--- a/krebs/3modules/fetchWallpaper.nix
+++ b/krebs/3modules/fetchWallpaper.nix
@@ -40,11 +40,12 @@ let
};
};
- fetchWallpaperScript = pkgs.writeScript "fetchWallpaper" ''
- #! ${pkgs.bash}/bin/bash
+ fetchWallpaperScript = pkgs.writeDash "fetchWallpaper" ''
+ set -euf
mkdir -p ${shell.escape cfg.stateDir}
- curl -s -o ${shell.escape cfg.stateDir}/wallpaper -z ${shell.escape cfg.stateDir}/wallpaper ${shell.escape cfg.url}
+ cd ${shell.escape cfg.stateDir}
+ curl -s -o wallpaper.tmp -z wallpaper ${shell.escape cfg.url} && mv wallpaper.tmp wallpaper
feh --no-fehbg --bg-scale ${shell.escape cfg.stateDir}/wallpaper
'';