summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/realwallpaper/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/simple/realwallpaper/default.nix')
-rw-r--r--krebs/5pkgs/simple/realwallpaper/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/krebs/5pkgs/simple/realwallpaper/default.nix b/krebs/5pkgs/simple/realwallpaper/default.nix
index ef83d2e59..b46cf08c1 100644
--- a/krebs/5pkgs/simple/realwallpaper/default.nix
+++ b/krebs/5pkgs/simple/realwallpaper/default.nix
@@ -1,5 +1,5 @@
{ pkgs, ... }:
-pkgs.writeDashBin "generate-wallpaper" ''
+pkgs.writers.writeDashBin "generate-wallpaper" ''
set -euf
# usage: getimg FILENAME URL
@@ -68,15 +68,15 @@ pkgs.writeDashBin "generate-wallpaper" ''
"$nightmap_url" &
fetch daymap-raw.png \
"$daymap_url" &
- fetch clouds-raw.jpg \
- "$cloudmap_url" &
fetch marker.json \
"$marker_url" &
wait
+ ${pkgs.nomads-cloud}/bin/nomads-cloud clouds-raw.png
+
check_type nightmap-raw.jpg image
check_type daymap-raw.png image
- check_type clouds-raw.jpg image
+ check_type clouds-raw.png image
in_size=2048x1024
xplanet_out_size=1466x1200
@@ -87,7 +87,7 @@ pkgs.writeDashBin "generate-wallpaper" ''
for raw in \
nightmap-raw.jpg \
daymap-raw.png \
- clouds-raw.jpg \
+ clouds-raw.png \
;
do
normal=''${raw%-raw.*}.png
@@ -128,6 +128,8 @@ pkgs.writeDashBin "generate-wallpaper" ''
# create marker file from json
if [ -s marker.json ]; then
jq -r 'to_entries[] | @json "\(.value.latitude) \(.value.longitude)"' marker.json > marker_file
+ echo 'position=sun image=subsolar.png transparent={255,255,255}' >> marker_file
+ echo 'position=moon image=sublunar.png transparent={255,255,255}' >> marker_file
fi
# make all unmodified files as final