diff --git a/src/action/macos/encrypt_apfs_volume.rs b/src/action/macos/encrypt_apfs_volume.rs index c48233ba4..bced91ad9 100644 --- a/src/action/macos/encrypt_apfs_volume.rs +++ b/src/action/macos/encrypt_apfs_volume.rs @@ -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"); @@ -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", diff --git a/src/planner/macos/mod.rs b/src/planner/macos/mod.rs index bf1543021..5f0a55485 100644 --- a/src/planner/macos/mod.rs +++ b/src/planner/macos/mod.rs @@ -133,14 +133,11 @@ async fn default_internal_root_disk() -> Result, PlannerError> { #[typetag::serde(name = "macos")] impl Planner for Macos { async fn default() -> Result { - 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>>, PlannerError> {