diff --git a/AGENTS.md b/AGENTS.md index a35fa380..d163fb6b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -68,7 +68,7 @@ Conventional commits: `type(scope): description` - Format check: `nix fmt` - Build a host: `nixos-rebuild build --flake .#{host}` -- Deploy a host: `./deploy.sh {host}` or `nixos-rebuild --flake .#{host} switch --target-host {host} --use-remote-sudo` +- Deploy a host: `./deploy.sh {host}` - Home-manager standalone: `home-manager switch --flake .#{user}@{host}` - CI/CD: Hydra at `hydra.m7.rs` builds all hosts on push; hosts auto-upgrade from the latest successful build (see `modules/nixos/hydra-auto-upgrade.nix`). diff --git a/deploy.sh b/deploy.sh index e2f2c54d..939de15e 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,8 +1,7 @@ #!/usr/bin/env bash +# Helper script to quickly deploy config to a host. Use it for rapid iteration. export NIX_SSHOPTS="-A" -build_remote=false - hosts="$1" shift @@ -12,5 +11,5 @@ if [ -z "$hosts" ]; then fi for host in ${hosts//,/ }; do - nixos-rebuild --flake .\#$host switch --target-host $host --use-remote-sudo --use-substitutes $@ + nixos-rebuild --flake .\#$host test --target-host $host --ask-sudo-password --use-substitutes $@ done