Add nix-deploy alias
This commit is contained in:
12
.zshrc
12
.zshrc
@@ -79,6 +79,18 @@ starttransfer: %{time_starttransfer} | \
|
||||
total: %{time_total} | \
|
||||
size: %{size_download}\n"'
|
||||
|
||||
nix-deploy() {
|
||||
TARGET=$1
|
||||
shift
|
||||
nix run --extra-experimental-features 'nix-command flakes' \
|
||||
nixpkgs#nixos-rebuild -- switch \
|
||||
--flake ".#${TARGET?}" \
|
||||
--target-host "${TARGET?}" \
|
||||
--build-host "${TARGET?}" \
|
||||
--use-remote-sudo \
|
||||
--fast "$@"
|
||||
}
|
||||
|
||||
myip() {
|
||||
if [ $# -eq 0 ]; then
|
||||
curl -4 --silent http://ipecho.net/plain; echo
|
||||
|
||||
Reference in New Issue
Block a user