summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/5pkgs/simple/realwallpaper/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix
index 62d88e1e9..f81f96efe 100644
--- a/krebs/5pkgs/simple/realwallpaper/default.nix
+++ b/krebs/5pkgs/simple/realwallpaper/default.nix
@@ -77,7 +77,10 @@ pkgs.writers.writeDashBin "generate-wallpaper" ''
fetch marker.json "$marker_url" &
wait
- ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png
+ # fetch clouds if they are older than 3h
+ if ! test "$(find clouds-raw.png -mmin -180)"; then
+ ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png
+ fi
check_type nightmap-raw.jpg image
check_type daymap-raw.png image