Skip to content
4 changes: 2 additions & 2 deletions src/darwin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl DarwinRebuildArgs {
update(&self.common.installable, self.update_args.update_input)?;
}

let hostname = self.hostname.ok_or(()).or_else(|()| get_hostname())?;
let hostname = get_hostname(self.hostname)?;

let (out_path, _tempdir_guard): (PathBuf, Option<tempfile::TempDir>) =
if let Some(ref p) = self.common.out_link {
Expand Down Expand Up @@ -222,7 +222,7 @@ impl DarwinReplArgs {
bail!("Nix doesn't support nix store installables.");
}

let hostname = self.hostname.ok_or(()).or_else(|()| get_hostname())?;
let hostname = get_hostname(self.hostname)?;

if let Installable::Flake {
ref mut attribute, ..
Expand Down
2 changes: 1 addition & 1 deletion src/home.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ where
if !found_config {
let username =
std::env::var("USER").map_err(|_| eyre!("Couldn't get username"))?;
let hostname = get_hostname()?;
let hostname = get_hostname(None)?;
let mut tried = vec![];

for attr_name in [format!("{username}@{hostname}"), username] {
Expand Down
Loading
Loading