meta: use 'nix flake update <input>' instead of removed --update-input

current nix CLI removed 'nix flake lock --update-input X' in
favour of 'nix flake update X'. switch all three call sites
(prepare_deploy, lock_update_for_rebuild,
lock_update_hyperhive). 'nix flake lock' with no args still
works for the seed path in sync_agents — it resolves missing
inputs without bumping existing ones.
This commit is contained in:
müde 2026-05-16 00:49:22 +02:00
parent 02139efbb1
commit 87c7b05b05

View file

@ -92,7 +92,7 @@ pub async fn sync_agents(
pub async fn prepare_deploy(name: &str) -> Result<()> {
let dir = meta_dir();
let input = format!("agent-{name}");
nix(&dir, &["flake", "lock", "--update-input", &input]).await
nix(&dir, &["flake", "update", &input]).await
}
/// Phase 2-success. Commits the staged `flake.lock` change with a
@ -127,7 +127,7 @@ pub async fn abort_deploy() -> Result<()> {
pub async fn lock_update_for_rebuild(name: &str) -> Result<()> {
let dir = meta_dir();
let input = format!("agent-{name}");
nix(&dir, &["flake", "lock", "--update-input", &input]).await?;
nix(&dir, &["flake", "update", &input]).await?;
if !git_is_clean(&dir).await? {
git(&dir, &["add", "flake.lock"]).await?;
git_commit(&dir, &format!("rebuild {name}: lock update")).await?;
@ -141,7 +141,7 @@ pub async fn lock_update_for_rebuild(name: &str) -> Result<()> {
#[allow(dead_code)]
pub async fn lock_update_hyperhive() -> Result<()> {
let dir = meta_dir();
nix(&dir, &["flake", "lock", "--update-input", "hyperhive"]).await?;
nix(&dir, &["flake", "update", "hyperhive"]).await?;
if !git_is_clean(&dir).await? {
git(&dir, &["add", "flake.lock"]).await?;
git_commit(&dir, "bump hyperhive").await?;