mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
Check hm-session-vars only if home-manager is enabled
This commit is contained in:
parent
c16fab55c0
commit
0b49d57487
1 changed files with 7 additions and 5 deletions
|
|
@ -61,11 +61,13 @@ writeText "login-inner" ''
|
||||||
[ "$#" -gt 0 ] || echo "Sourcing Nix environment..."
|
[ "$#" -gt 0 ] || echo "Sourcing Nix environment..."
|
||||||
. $HOME/.nix-profile/etc/profile.d/nix.sh
|
. $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||||
|
|
||||||
|
${lib.optionalString (config.home-manager.config != null) ''
|
||||||
if [ -e "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then
|
if [ -e "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then
|
||||||
[ "$#" -gt 0 ] || echo "Sourcing home-manager environment..."
|
[ "$#" -gt 0 ] || echo "Sourcing home-manager environment..."
|
||||||
export NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:}$NIX_PATH
|
export NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:}$NIX_PATH
|
||||||
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
. "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||||
fi
|
fi
|
||||||
|
''}
|
||||||
|
|
||||||
# Workaround for https://github.com/NixOS/nix/issues/1865
|
# Workaround for https://github.com/NixOS/nix/issues/1865
|
||||||
export NIX_PATH=nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs/:$NIX_PATH
|
export NIX_PATH=nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs/:$NIX_PATH
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue