Skip to content

Commit

Permalink
Merge pull request #82 from psfloyd/master
Browse files Browse the repository at this point in the history
fix: "nh os test" do not set nix-profile
  • Loading branch information
viperML authored Apr 9, 2024
2 parents fd98e31 + e74e6b6 commit 06e9d51
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/nixos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,6 @@ impl OsRebuildArgs {
}
}

commands::CommandBuilder::default()
.args([
"sudo",
"nix-env",
"--profile",
SYSTEM_PROFILE,
"--set",
out_link_str,
])
.build()?
.exec()?;

if let Test(_) | Switch(_) = rebuild_type {
// !! Use the target profile aka spec-namespaced
let switch_to_configuration =
Expand All @@ -152,6 +140,18 @@ impl OsRebuildArgs {
}

if let Boot(_) | Switch(_) = rebuild_type {
commands::CommandBuilder::default()
.args([
"sudo",
"nix-env",
"--profile",
SYSTEM_PROFILE,
"--set",
out_link_str,
])
.build()?
.exec()?;

// !! Use the base profile aka no spec-namespace
let switch_to_configuration = out_link.join("bin").join("switch-to-configuration");
let switch_to_configuration = switch_to_configuration.to_str().unwrap();
Expand Down

0 comments on commit 06e9d51

Please sign in to comment.