diff --git a/src/cli/cmd/apply/home_manager.rs b/src/cli/cmd/apply/home_manager.rs index bddf3f26..0ad85961 100644 --- a/src/cli/cmd/apply/home_manager.rs +++ b/src/cli/cmd/apply/home_manager.rs @@ -30,7 +30,10 @@ fn parse_output_ref(output_ref: &str) -> Result { Ok(match output_ref.split('#').collect::>()[..] { [_release, _output_path] => parse_release_ref(output_ref)?, - [release] => format!("{release}#homeConfigurations.{username}"), + [release] => format!( + "{}#homeConfigurations.{username}", + parse_release_ref(release)? + ), _ => return Err(FhError::MalformedOutputRef(output_ref.to_string())), }) } diff --git a/src/cli/cmd/apply/nix_darwin.rs b/src/cli/cmd/apply/nix_darwin.rs index f587929a..2d65244b 100644 --- a/src/cli/cmd/apply/nix_darwin.rs +++ b/src/cli/cmd/apply/nix_darwin.rs @@ -33,7 +33,10 @@ fn parse_output_ref(output_ref: &str) -> Result { Ok(match output_ref.split('#').collect::>()[..] { [_release, _output_path] => parse_release_ref(output_ref)?, - [release] => format!("{release}#darwinConfigurations.{devicename}.system"), + [release] => format!( + "{}#darwinConfigurations.{devicename}.system", + parse_release_ref(release)? + ), _ => return Err(FhError::MalformedOutputRef(output_ref.to_string())), }) } diff --git a/src/cli/cmd/apply/nixos.rs b/src/cli/cmd/apply/nixos.rs index e60b1a31..189e4d72 100644 --- a/src/cli/cmd/apply/nixos.rs +++ b/src/cli/cmd/apply/nixos.rs @@ -63,7 +63,10 @@ fn parse_output_ref(output_ref: &str) -> Result { Ok(match output_ref.split('#').collect::>()[..] { [_release, _output_path] => parse_release_ref(output_ref)?, - [release] => format!("{release}#nixosConfigurations.{hostname}"), + [release] => format!( + "{}#nixosConfigurations.{hostname}", + parse_release_ref(release)? + ), _ => return Err(FhError::MalformedOutputRef(output_ref.to_string())), }) }