From b705b66bfc72bd5d9fc67838ba55f3644be67c22 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sun, 15 Nov 2026 13:57:04 +0000 Subject: [PATCH] devshell: Replace `deploy-multi` with `--targets` --- AGENTS.md | 4 +++- devshell/commands.nix | 14 -------------- docs/deployment.md | 5 +++-- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 354ec92..cf91f3a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -42,7 +42,9 @@ Common ones: - `check-system [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 errors quickly and cheaply; only do a full build when you specifically need the built artifact. -- `deploy ` and `deploy-multi ` — deploy-rs deployment (uses `.keys/deploy.key`, `--skip-checks`). +- `deploy ` — deploy-rs deployment (uses `.keys/deploy.key`, `--skip-checks`). + Use `deploy --targets .# .#` 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 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 diff --git a/devshell/commands.nix b/devshell/commands.nix index 5980792..5cdebb1 100644 --- a/devshell/commands.nix +++ b/devshell/commands.nix @@ -156,19 +156,5 @@ in help = "Update installer tag (to trigger new release)"; 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 - ''; - } ]; } diff --git a/docs/deployment.md b/docs/deployment.md index 1beb6e9..9a218d1 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -47,7 +47,8 @@ Generated profiles deploy in this order: - `deploy .#` — the devshell's `deploy` is a wrapper that adds `--skip-checks`. Node names are the system names (`deploy .#git`). -- `deploy-multi ` — loops `deploy` over several nodes (extra args via `$O`). +- `deploy --targets .# .#` — deploys several nodes in one invocation. + Pass shared options directly, e.g. `deploy --boot --targets .#river .#stream`. - `deploy --boot .#` — 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 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 [nix args]` | Builds `.#homeConfigurations."".activationPackage`. | | `home-switch [args]` | `home-manager switch --flake .`. | | `deploy [args]` | `deploy-rs --skip-checks` (wrapper package in `devshell/default.nix`). | -| `deploy-multi ` | Deploys several nodes in sequence. | +| `deploy --targets .# .#` | Deploys several nodes in one invocation. | | `ssh-machine [cmd]` | SSH to a system or home by name, resolving target/options from its deploy-rs node (see above). | | `run-vm ` | 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 ` | Builds `config.my.buildAs.iso`. |