Skip to content

Commit

Permalink
Merge pull request #231 from serokell/rvem/#201-dont-hardcode-profile…
Browse files Browse the repository at this point in the history
…-directory

[#201] Deduce profile directory during activation
  • Loading branch information
rvem authored Sep 12, 2023
2 parents d0cfc04 + f26e888 commit 31c32fb
Show file tree
Hide file tree
Showing 6 changed files with 316 additions and 68 deletions.
163 changes: 144 additions & 19 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ edition = "2018"

[dependencies]
clap = { version = "3.0.0-beta.2", features = [ "wrap_help" ] }
dirs = "5.0.1"
flexi_logger = "0.16"
fork = "0.1"
futures-util = "0.3.6"
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ This is the core of how `deploy-rs` was designed, any number of these can run on
path = deploy-rs.lib.x86_64-linux.activate.custom pkgs.hello "./bin/hello";
# An optional path to where your profile should be installed to, this is useful if you want to use a common profile name across multiple users, but would have conflicts in your node's profile list.
# This will default to `"/nix/var/nix/profiles/$PROFILE_NAME` if `user` is root (see: generic options), and `/nix/var/nix/profiles/per-user/$USER/$PROFILE_NAME` if it is not.
profilePath = "/nix/var/nix/profiles/per-user/someuser/someprofile";
# This will default to `"/nix/var/nix/profiles/system` if `user` is `root` and profile name is `system`,
# `/nix/var/nix/profiles/per-user/root/$PROFILE_NAME` if profile name is different.
# For non-root profiles will default to /nix/var/nix/profiles/per-user/$USER/$PROFILE_NAME if `/nix/var/nix/profiles/per-user/$USER` already exists,
# and `${XDG_STATE_HOME:-$HOME/.local/state}/nix/profiles/$PROFILE_NAME` otherwise.
profilePath = "/home/someuser/.local/state/nix/profiles/someprofile";
# ...generic options... (see lower section)
}
Expand Down
Loading

0 comments on commit 31c32fb

Please sign in to comment.