Justfile: dont try to render templates when offline

This commit is contained in:
steveej 2019-09-06 12:31:28 +02:00
parent d1ef08ec64
commit 5faccc4cab

View file

@ -25,8 +25,12 @@ _device recipe dir +moreargs="":
_render_templates:
#!/usr/bin/env bash
set -ex
source $(just -v _get_nix_path {{invocation_directory()}}/nix/variables/versions.nix)
nix/scripts/pre-eval-fixed.sh nix/home-manager/profiles/dotfiles/vcsh{.tmpl,}.nix
if ! ip route get 0.0.0.1; then
echo No route to WAN. Skipping template rendering...
else
source $(just -v _get_nix_path {{invocation_directory()}}/nix/variables/versions.nix)
nix/scripts/pre-eval-fixed.sh nix/home-manager/profiles/dotfiles/vcsh{.tmpl,}.nix
fi
_rebuild-device dir rebuildarg="dry-activate" +moreargs="": _render_templates
#!/usr/bin/env bash