Find commands for tridactyl. WIP subcommand.

WIP subcommand for installing a new host.
This commit is contained in:
kat witch 2021-02-26 08:10:34 +00:00
parent bede674088
commit 6727a8c014
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
2 changed files with 14 additions and 1 deletions

9
nyx
View file

@ -16,6 +16,13 @@ build() {
nix build -f . deploy.$HOST && ./result $METHOD
}
install() {
nix build -f . hosts.$HOST.config.system.build.toplevel
CLOSURE=$(readlink result)
nix-store --export $(nix-store -qR ./result) | ssh root@$HOST nix-store --import --store /mnt
ssh root@$HOST nixos-install --system $CLOSURE
}
main() {
if [ $# -lt 2 ]; then
usage
@ -23,7 +30,7 @@ main() {
CMD=$1
shift
"$CMD" "$@"
$CMD $@
fi
}