From 4c722d1e9a1ffd9ce02d4b8e94b6d7e987bfdc8a Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Thu, 22 Jun 2023 09:38:24 +0000 Subject: [PATCH] fix: fix home-manager switch --- Cargo.lock | 4 ++-- crates/cli/Cargo.toml | 4 ++-- crates/installers/Cargo.toml | 2 +- crates/installers/src/home_manager.rs | 5 +---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1d699b4..2fade4d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1069,7 +1069,7 @@ dependencies = [ [[package]] name = "crosup" -version = "0.4.4" +version = "0.4.5" dependencies = [ "anyhow", "clap 3.2.25", @@ -1121,7 +1121,7 @@ dependencies = [ [[package]] name = "crosup-installers" -version = "0.1.7" +version = "0.1.8" dependencies = [ "anyhow", "crosup-macros", diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index af771cb..2c74244 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" name = "crosup" readme = "../../README.md" repository = "https://github.com/tsirysndr/crosup" -version = "0.4.4" +version = "0.4.5" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -17,7 +17,7 @@ anyhow = "1.0.71" clap = "3.2.20" crosup-core = {path = "../core", version = "0.1.7"} crosup-entity = {version = "0.1.0", path = "../entity"} -crosup-installers = {path = "../installers", version = "0.1.7"} +crosup-installers = {path = "../installers", version = "0.1.8"} crosup-nix = {path = "../nix", version = "0.1.1"} crosup-repo = {path = "../repo", version = "0.1.0"} crosup-ssh = {path = "../ssh", version = "0.1.0"} diff --git a/crates/installers/Cargo.toml b/crates/installers/Cargo.toml index 5895303..72fc785 100644 --- a/crates/installers/Cargo.toml +++ b/crates/installers/Cargo.toml @@ -7,7 +7,7 @@ keywords = ["chromebook", "chromeos", "homebrew", "docker", "nix"] license = "MIT" name = "crosup-installers" repository = "https://github.com/tsirysndr/crosup" -version = "0.1.7" +version = "0.1.8" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/crates/installers/src/home_manager.rs b/crates/installers/src/home_manager.rs index 98e79cd..c4ed001 100644 --- a/crates/installers/src/home_manager.rs +++ b/crates/installers/src/home_manager.rs @@ -116,10 +116,7 @@ impl Installer for HomeManagerInstaller { let updated_nix_configs = crosup_nix::add_packages(&home_nix_content, packages)?; fs::write(home_nix, updated_nix_configs)?; - println!("-> Running {}", "home-manager switch".bright_green()); - let nix_env = ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"; - let command = format!("{} && home-manager switch", nix_env); - exec_bash_with_output!(command, self.session.clone()); + home_manager_switch!(self.session.clone()); } self.postinstall()?;