diff --git a/modules/hosts/t480/dwm/dwmblocks/weather.nix b/modules/hosts/t480/dwm/dwmblocks/weather.nix index 2002481a..84d3aee3 100644 --- a/modules/hosts/t480/dwm/dwmblocks/weather.nix +++ b/modules/hosts/t480/dwm/dwmblocks/weather.nix @@ -9,7 +9,11 @@ runtimeInputs = with pkgs; [ curl ]; text = '' - curl -s https://wttr.in/Caerleon?format=%t + out="$(curl -s https://wttr.in/Caerleon?format=%t)" + + [[ "$out" == *"Unknown location"* ]] && exit 1 + + echo "$out" ''; }) ];