diff options
author | makefu <github@syntax-fehler.de> | 2017-02-04 14:31:47 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-02-04 14:31:47 +0100 |
commit | d6c9edd9dc860d560d4ea7a727962aaf93d09322 (patch) | |
tree | aefb49a9372b959cd722bdfcf51001783cda8bb1 /krebs/3modules/fetchWallpaper.nix | |
parent | d2df5375e705e55764b4cacd4ea32dffcb4c6041 (diff) | |
parent | 8daef993dcb6149a02c72a4895d6e808a6c6a8d4 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/fetchWallpaper.nix')
-rw-r--r-- | krebs/3modules/fetchWallpaper.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/krebs/3modules/fetchWallpaper.nix b/krebs/3modules/fetchWallpaper.nix index aed5f595c..29c4f50e9 100644 --- a/krebs/3modules/fetchWallpaper.nix +++ b/krebs/3modules/fetchWallpaper.nix @@ -38,6 +38,11 @@ let ''; default = {}; }; + maxTime = mkOption { + type = types.int; + default = 0; + description = "Time to wait before download is aborted"; + }; }; fetchWallpaperScript = pkgs.writeDash "fetchWallpaper" '' @@ -45,7 +50,7 @@ let mkdir -p ${shell.escape cfg.stateDir} cd ${shell.escape cfg.stateDir} - (curl -s -o wallpaper.tmp -z wallpaper ${shell.escape cfg.url} && mv wallpaper.tmp wallpaper) || : + (curl --max-time ${toString cfg.maxTime} -s -o wallpaper.tmp -z wallpaper ${shell.escape cfg.url} && mv wallpaper.tmp wallpaper) || : feh --no-fehbg --bg-scale ${shell.escape cfg.stateDir}/wallpaper ''; |