Skip to content

Commit

Permalink
uds: limit output of nixconf lines when using determinatenixd
Browse files Browse the repository at this point in the history
  • Loading branch information
colemickens committed Jul 29, 2024
1 parent 3e7118d commit 6a5c612
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/cli/cmd/login/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,16 @@ impl LoginSubcommand {

if !succeeded {
update_netrc_file(&netrc_file_path, &netrc_contents).await?;

// only update user_nix_config if we could use determinatenixd
upsert_user_nix_config(
&nix_config_path,
&netrc_file_string,
&netrc_contents,
&user_nix_config_addition,
&self.cache_addr,
)
.await?;
}
// NOTE: Keep an eye on any movement in the following issues / PRs. Them being resolved
// means we may be able to ditch setting `netrc-file` in favor of `access-tokens`. (The
Expand All @@ -222,15 +232,6 @@ impl LoginSubcommand {

tokio::fs::write(token_path, &token).await?;

upsert_user_nix_config(
&nix_config_path,
&netrc_file_string,
&netrc_contents,
&user_nix_config_addition,
&self.cache_addr,
)
.await?;

let added_nix_config =
nix_config_parser::NixConfig::parse_string(root_nix_config_addition.clone(), None)?;
let root_nix_config_path = PathBuf::from("/etc/nix/nix.conf");
Expand Down

0 comments on commit 6a5c612

Please sign in to comment.