Skip to content

Commit

Permalink
fix: install home-manager if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jun 22, 2023
1 parent 0e1a683 commit e36d2cb
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ license = "MIT"
name = "crosup"
readme = "../../README.md"
repository = "https://github.com/tsirysndr/crosup"
version = "0.4.2"
version = "0.4.3"

# 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.5"}
crosup-installers = {path = "../installers", version = "0.1.6"}
crosup-nix = {path = "../nix", version = "0.1.1"}
crosup-repo = {path = "../repo", version = "0.1.0"}
crosup-ssh = {path = "../ssh", version = "0.1.0"}
2 changes: 1 addition & 1 deletion crates/installers/Cargo.toml
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ keywords = ["chromebook", "chromeos", "homebrew", "docker", "nix"]
license = "MIT"
name = "crosup-installers"
repository = "https://github.com/tsirysndr/crosup"
version = "0.1.5"
version = "0.1.6"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

8 changes: 8 additions & 0 deletions crates/installers/src/home_manager.rs
Original file line number Diff line number Diff line change
@@ -59,6 +59,14 @@ impl HomeManagerInstaller {
"nix run home-manager/master -- init".bright_green()
);
home_manager_init!(self.session.clone());

println!(
"-> Running {}",
"nix profile install home-manager/master".bright_green()
);
let nix_env = ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh";
let command = format!("{} && nix profile install home-manager/master", nix_env);
exec_bash_with_output!(command, self.session.clone());
Ok(())
}

0 comments on commit e36d2cb

Please sign in to comment.