From 00ee103dc17368d7bfa08a2c50118951d1c35c2c Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Fri, 6 Oct 2023 14:00:06 -0700 Subject: [PATCH] nix flake lock after writing the new flake.nix contents --- src/cli/cmd/convert.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli/cmd/convert.rs b/src/cli/cmd/convert.rs index c56e795a..1e300e47 100644 --- a/src/cli/cmd/convert.rs +++ b/src/cli/cmd/convert.rs @@ -83,7 +83,12 @@ impl CommandExecute for ConvertSubcommand { println!("{new_flake_contents}"); } else { tokio::fs::write(self.flake_path, new_flake_contents).await?; - // TODO: nix flake lock? + tokio::process::Command::new("nix") + .args(&["--extra-experimental-features", "nix-command flakes"]) + .arg("flake") + .arg("lock") + .status() + .await?; } Ok(ExitCode::SUCCESS)