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:
parent
02139efbb1
commit
87c7b05b05
1 changed files with 3 additions and 3 deletions
|
|
@ -92,7 +92,7 @@ pub async fn sync_agents(
|
||||||
pub async fn prepare_deploy(name: &str) -> Result<()> {
|
pub async fn prepare_deploy(name: &str) -> Result<()> {
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
let input = format!("agent-{name}");
|
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
|
/// 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<()> {
|
pub async fn lock_update_for_rebuild(name: &str) -> Result<()> {
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
let input = format!("agent-{name}");
|
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? {
|
if !git_is_clean(&dir).await? {
|
||||||
git(&dir, &["add", "flake.lock"]).await?;
|
git(&dir, &["add", "flake.lock"]).await?;
|
||||||
git_commit(&dir, &format!("rebuild {name}: lock update")).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)]
|
#[allow(dead_code)]
|
||||||
pub async fn lock_update_hyperhive() -> Result<()> {
|
pub async fn lock_update_hyperhive() -> Result<()> {
|
||||||
let dir = meta_dir();
|
let dir = meta_dir();
|
||||||
nix(&dir, &["flake", "lock", "--update-input", "hyperhive"]).await?;
|
nix(&dir, &["flake", "update", "hyperhive"]).await?;
|
||||||
if !git_is_clean(&dir).await? {
|
if !git_is_clean(&dir).await? {
|
||||||
git(&dir, &["add", "flake.lock"]).await?;
|
git(&dir, &["add", "flake.lock"]).await?;
|
||||||
git_commit(&dir, "bump hyperhive").await?;
|
git_commit(&dir, "bump hyperhive").await?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue