mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
nix-env: Create ~/.nix-defexpr automatically
This commit is contained in:
parent
61a6176aca
commit
c9159f86cc
3 changed files with 12 additions and 30 deletions
|
@ -5,18 +5,6 @@ __ETC_PROFILE_NIX_SOURCED=1
|
|||
export NIX_USER_PROFILE_DIR="@localstatedir@/nix/profiles/per-user/$USER"
|
||||
export NIX_PROFILES="@localstatedir@/nix/profiles/default $HOME/.nix-profile"
|
||||
|
||||
if test -w $HOME; then
|
||||
# Set up a default Nix expression from which to install stuff.
|
||||
if [ ! -e $HOME/.nix-defexpr -o -L $HOME/.nix-defexpr ]; then
|
||||
rm -f $HOME/.nix-defexpr
|
||||
mkdir -p $HOME/.nix-defexpr
|
||||
if [ "$USER" != root ]; then
|
||||
ln -s @localstatedir@/nix/profiles/per-user/root/channels $HOME/.nix-defexpr/channels_root
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
|
||||
if [ ! -z "${NIX_SSL_CERT_FILE:-}" ]; then
|
||||
: # Allow users to override the NIX_SSL_CERT_FILE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue