scripts/deploy: if no host is specified, then deploy to the current host

This commit is contained in:
Colin 2024-06-12 07:44:21 +00:00
parent 63f3b8e89b
commit b787289b39

View File

@ -1,11 +1,12 @@
#!/bin/sh
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nettools
set -e
usage() {
echo "deploy: deploy a nix config to a remote machine, possibly activating it"
echo ""
echo "usage: deploy [options] <host>"
echo "usage: deploy [options] [host]"
echo "options:"
echo "- --action switch|test"
echo "- --variant light|min"
@ -13,6 +14,7 @@ usage() {
}
action=switch
host=$(hostname)
variant=
nixArgs=()
parseArgs() {