mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 10:04:09 -05:00
feat: improve deploy script so it works with sudo, tell agents to use it.
This commit is contained in:
@@ -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`).
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user