Skip to content

Commit

Permalink
Merge pull request #63 from tsirysndr/fix/home-manager-install
Browse files Browse the repository at this point in the history
fix: install home-manager if not installed
  • Loading branch information
tsirysndr authored Jun 22, 2023
2 parents 0e1a683 + e36d2cb commit 24c7f73
Show file tree
Hide file tree
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
Expand Up @@ -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

Expand All @@ -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"}
Expand Down
2 changes: 1 addition & 1 deletion crates/installers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions crates/installers/src/home_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down

0 comments on commit 24c7f73

Please sign in to comment.