mirror of
https://github.com/tuxdotrs/tnvim.git
synced 2025-07-06 21:36:34 +05:30
add remote build support
This commit is contained in:
11
deploy.sh
11
deploy.sh
@ -1,16 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
export NIX_SSHOPTS="-A"
|
export NIX_SSHOPTS="-A"
|
||||||
|
|
||||||
build_remote=false
|
hostname=$(hostname)
|
||||||
|
target_hosts="$1"
|
||||||
hosts="$1"
|
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if [ -z "$hosts" ]; then
|
if [ -z "$target_hosts" ]; then
|
||||||
echo "No hosts to deploy"
|
echo "No hosts to deploy"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for host in ${hosts//,/ }; do
|
for target_host in ${target_hosts//,/ }; do
|
||||||
nixos-rebuild --flake .\#$host switch --target-host $host --use-remote-sudo --log-format internal-json -v |& nom --json $@
|
nixos-rebuild switch --flake .#$target_host --target-host $target_host --build-host $hostname --use-remote-sudo --use-substitutes --log-format internal-json -v $@
|
||||||
done
|
done
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
trusted-users = ["${username}"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user