From ea487aacc2aa8eec76c1ff3499ebe0ea99a8bc09 Mon Sep 17 00:00:00 2001 From: Oliver Breitwieser Date: Mon, 5 Aug 2024 23:15:58 +0200 Subject: [PATCH] fix: handle dots in username/hostname Originally suggested by [@ToyVo](https://github.com/viperML/nh/issues/135#issuecomment-2231319974) Fixes: #135 --- src/home.rs | 2 +- src/nixos.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/home.rs b/src/home.rs index 18331c8..436eb92 100644 --- a/src/home.rs +++ b/src/home.rs @@ -56,7 +56,7 @@ impl HomeRebuildArgs { debug!("hm_config_name: {}", hm_config_name); let flakeref = format!( - "{}#homeConfigurations.{}.config.home.activationPackage", + "{}#homeConfigurations.\"{}\".config.home.activationPackage", &self.common.flakeref.deref(), hm_config_name ); diff --git a/src/nixos.rs b/src/nixos.rs index 246c1d1..bfb0cf8 100644 --- a/src/nixos.rs +++ b/src/nixos.rs @@ -43,7 +43,7 @@ impl OsRebuildArgs { debug!("out_link {:?}", out_link); let flake_output = format!( - "{}#nixosConfigurations.{:?}.config.system.build.toplevel", + "{}#nixosConfigurations.\"{:?}\".config.system.build.toplevel", &self.common.flakeref.deref(), hostname );