diff options
Diffstat (limited to 'krebs/3modules/fetchWallpaper.nix')
-rw-r--r-- | krebs/3modules/fetchWallpaper.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix index e6bb06a95..0adcec3d8 100644 --- a/krebs/3modules/fetchWallpaper.nix +++ b/krebs/3modules/fetchWallpaper.nix @@ -41,8 +41,11 @@ let }; 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 ''; |