devshell: Replace deploy-multi with --targets
CI / Check, build and cache nixfiles (push) Successful in 42m1s
Update docs / update (push) Failing after 1m7s

This commit is contained in:
2026-11-15 13:57:04 +00:00
parent 93ac20e053
commit b705b66bfc
3 changed files with 6 additions and 17 deletions
+3 -1
View File
@@ -42,7 +42,9 @@ Common ones:
- `check-system <host> [nix args]` — evaluate a system (catches eval errors without a full build). - `check-system <host> [nix args]` — evaluate a system (catches eval errors without a full build).
**Prefer this over `build-system` to validate a config change** — evaluation surfaces module/option **Prefer this over `build-system` to validate a config change** — evaluation surfaces module/option
errors quickly and cheaply; only do a full build when you specifically need the built artifact. errors quickly and cheaply; only do a full build when you specifically need the built artifact.
- `deploy <host>` and `deploy-multi <hosts...>` — deploy-rs deployment (uses `.keys/deploy.key`, `--skip-checks`). - `deploy <host>` — deploy-rs deployment (uses `.keys/deploy.key`, `--skip-checks`).
Use `deploy --targets .#<host1> .#<host2>` for multiple targets; shared options go directly
on the command, e.g. `deploy --boot --targets .#river .#stream`.
Pass the flake-qualified node, e.g. `deploy .#git`. The deploy node name is **always** the system Pass the flake-qualified node, e.g. `deploy .#git`. The deploy node name is **always** the system
name (`deploy-rs.nix` keys nodes directly off `nixos.systems` / `home-manager.homes`); a system is name (`deploy-rs.nix` keys nodes directly off `nixos.systems` / `home-manager.homes`); a system is
only a deploy target when `config.my.deploy.enable` is true (defaults true; auto-disabled for dev only a deploy target when `config.my.deploy.enable` is true (defaults true; auto-disabled for dev
-14
View File
@@ -156,19 +156,5 @@ in
help = "Update installer tag (to trigger new release)"; help = "Update installer tag (to trigger new release)";
command = ''git tag -f installer && git push -f origin installer''; command = ''git tag -f installer && git push -f origin installer'';
} }
{
name = "deploy-multi";
category = "tasks";
help = "Deploy multiple flakes at once";
command = ''
for f in $@; do
if [ -n "''${O:-}" ]; then
deploy "$O" $f
else
deploy $f
fi
done
'';
}
]; ];
} }
+3 -2
View File
@@ -47,7 +47,8 @@ Generated profiles deploy in this order:
- `deploy .#<host>` — the devshell's `deploy` is a wrapper that adds `--skip-checks`. Node - `deploy .#<host>` — the devshell's `deploy` is a wrapper that adds `--skip-checks`. Node
names are the system names (`deploy .#git`). names are the system names (`deploy .#git`).
- `deploy-multi <hosts...>` — loops `deploy` over several nodes (extra args via `$O`). - `deploy --targets .#<host1> .#<host2>` — deploys several nodes in one invocation.
Pass shared options directly, e.g. `deploy --boot --targets .#river .#stream`.
- `deploy --boot .#<host>` — stages the config as the boot default **without** live-switching - `deploy --boot .#<host>` — stages the config as the boot default **without** live-switching
(deploy-rs's `--boot` maps to the custom activation's `boot` phase, which also does the (deploy-rs's `--boot` maps to the custom activation's `boot` phase, which also does the
generation cleanup). Use it when a live `switch` would cut the box off mid-change (e.g. a generation cleanup). Use it when a live `switch` would cut the box off mid-change (e.g. a
@@ -99,7 +100,7 @@ command with no arguments for its help. From
| `build-home <name> [nix args]` | Builds `.#homeConfigurations."<name>".activationPackage`. | | `build-home <name> [nix args]` | Builds `.#homeConfigurations."<name>".activationPackage`. |
| `home-switch [args]` | `home-manager switch --flake .`. | | `home-switch [args]` | `home-manager switch --flake .`. |
| `deploy [args]` | `deploy-rs --skip-checks` (wrapper package in `devshell/default.nix`). | | `deploy [args]` | `deploy-rs --skip-checks` (wrapper package in `devshell/default.nix`). |
| `deploy-multi <nodes...>` | Deploys several nodes in sequence. | | `deploy --targets .#<node1> .#<node2>` | Deploys several nodes in one invocation. |
| `ssh-machine <name> [cmd]` | SSH to a system or home by name, resolving target/options from its deploy-rs node (see above). | | `ssh-machine <name> [cmd]` | SSH to a system or home by name, resolving target/options from its deploy-rs node (see above). |
| `run-vm <host>` | Boots a system as a dev VM: installs `.keys/dev.key` into a temp `xchg/`, then `nix run`s `config.my.buildAs.devVM`. | | `run-vm <host>` | Boots a system as a dev VM: installs `.keys/dev.key` into a temp `xchg/`, then `nix run`s `config.my.buildAs.devVM`. |
| `build-iso <host>` | Builds `config.my.buildAs.iso`. | | `build-iso <host>` | Builds `config.my.buildAs.iso`. |