Revert "deploy: take optional target argument"
This reverts commit fac851faf9
.
This commit is contained in:
parent
84d5eb4174
commit
e59d4f45c0
@ -1,12 +1,13 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
#
|
#
|
||||||
# usage: nixos-deploy HOST [TARGET] [SYSTEM]
|
# deploy
|
||||||
#
|
#
|
||||||
set -euf
|
set -euf
|
||||||
|
|
||||||
host=$1
|
host=$1
|
||||||
target=${2-root@$host}
|
system=${2-$(nixos-build "$host")}
|
||||||
system=${3-$(nixos-build "$host")}
|
|
||||||
|
target=root@$host
|
||||||
|
|
||||||
nix-copy-closure --gzip --to "$target" "$system"
|
nix-copy-closure --gzip --to "$target" "$system"
|
||||||
|
|
||||||
|
6
deploy
6
deploy
@ -1,9 +1,11 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
#
|
#
|
||||||
# usage: ./deploy HOST [TARGET]
|
# usage: ./deploy HOST
|
||||||
#
|
#
|
||||||
set -euf
|
set -euf
|
||||||
|
|
||||||
|
host=$1
|
||||||
|
|
||||||
export PATH="$PWD/bin:$PATH"
|
export PATH="$PWD/bin:$PATH"
|
||||||
#export nixpkgs=/var/nixpkgs
|
#export nixpkgs=/var/nixpkgs
|
||||||
export nixpkgs_root=$PWD/tmp/nixpkgs
|
export nixpkgs_root=$PWD/tmp/nixpkgs
|
||||||
@ -11,4 +13,4 @@ export config_root=$PWD
|
|||||||
export retiolum_hosts=$PWD/hosts
|
export retiolum_hosts=$PWD/hosts
|
||||||
export secrets_root=$PWD/secrets
|
export secrets_root=$PWD/secrets
|
||||||
|
|
||||||
exec nixos-deploy "$@"
|
exec nixos-deploy "$host"
|
||||||
|
Loading…
Reference in New Issue
Block a user