This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.deploy: default target host to <machine>.r

+6 -5
+5 -4
tools/deploy/flake-module.nix
··· 7 7 ... 8 8 }: 9 9 { 10 - # deploy [--flake PATH] <machine> <[user@]host> 10 + # deploy [--flake PATH] <machine> [[user@]host] (host defaults to <machine>.r) 11 11 # 12 12 # Generates vars, copies the flake source to /var/lib/deploy/incoming 13 13 # on the target, builds it there in the systemd unit deploy-build ··· 28 28 ]; 29 29 text = '' 30 30 usage() { 31 - echo "usage: deploy [--flake PATH] <machine> <[user@]host>" >&2 31 + echo "usage: deploy [--flake PATH] <machine> [[user@]host] (host defaults to <machine>.r)" >&2 32 32 exit 1 33 33 } 34 34 ··· 44 44 *) break ;; 45 45 esac 46 46 done 47 - [ $# -eq 2 ] || usage 47 + [ $# -eq 1 ] || [ $# -eq 2 ] || usage 48 48 machine=$1 49 - target=$2 49 + target=''${2:-$machine.r} 50 50 [[ $target == *@* ]] || target=root@$target 51 51 52 52 state=/var/lib/deploy ··· 149 149 } 150 150 151 151 step "connecting to $target" 152 + remote true || { echo "deploy: cannot reach $target" >&2; exit 1; } 152 153 # shellcheck disable=SC2016 # expanded on the target 153 154 remote 'test -e /etc/NIXOS && command -v systemd-run >/dev/null' || 154 155 { echo "deploy: $target is not a NixOS system with systemd" >&2; exit 1; }
+1 -1
tools/deploy/usage.kdl
··· 5 5 arg "<path>" 6 6 } 7 7 arg "<machine>" help="Machine configuration to deploy" 8 - arg "<target_host>" help="SSH destination to deploy to, [user@]host (user defaults to root)" 8 + arg "[target_host]" help="SSH destination to deploy to, [user@]host (default: <machine>.r, user defaults to root)"