Skip to content

Commit

Permalink
Don't hardcode the path
Browse files Browse the repository at this point in the history
  • Loading branch information
aaomidi committed Nov 26, 2024
1 parent 10e6075 commit e2863ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/action/macos/encrypt_apfs_volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl EncryptApfsVolume {
command.args(["find-generic-password", "-a"]);
command.arg(&name);
command.arg("-s");
command.arg("Nix Store");
command.arg(&name);
command.arg("-l");
command.arg(format!("{} encryption password", disk.display()));
command.arg("-D");
Expand Down Expand Up @@ -186,7 +186,7 @@ impl Action for EncryptApfsVolume {
"-a",
self.name.as_str(),
"-s",
"Nix Store",
self.name.as_str(),
"-l",
format!("{} encryption password", disk_str).as_str(),
"-D",
Expand Down
13 changes: 5 additions & 8 deletions src/planner/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,11 @@ async fn default_internal_root_disk() -> Result<Option<String>, PlannerError> {
#[typetag::serde(name = "macos")]
impl Planner for Macos {
async fn default() -> Result<Self, PlannerError> {
Ok(Self {
settings: CommonSettings::default().await?,
use_ec2_instance_store: false,
root_disk: Some(default_root_disk().await?),
case_sensitive: false,
encrypt: None,
volume_label: "Nix Store".into(),
})
use clap::Parser;

// Parse using clap to handle defaults and environment variables
let macos = Macos::parse_from(&["nix-installer"]);
Ok(macos)
}

async fn plan(&self) -> Result<Vec<StatefulAction<Box<dyn Action>>>, PlannerError> {
Expand Down

0 comments on commit e2863ba

Please sign in to comment.