From 7e00a6373371a25cf0b8ada83468ca78d1fc49b5 Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Tue, 14 Dec 2021 20:12:23 +0100 Subject: [PATCH] session-init: consistently use the config for resolving home directory It is not helpful to switch between `$HOME` and the config option for resolving the path of the home directory. --- modules/environment/session-init.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/environment/session-init.nix b/modules/environment/session-init.nix index c8f16d0..7ab1776 100644 --- a/modules/environment/session-init.nix +++ b/modules/environment/session-init.nix @@ -25,7 +25,7 @@ let [ -n "$__NOD_SESS_INIT_SOURCED" ] && return export __NOD_SESS_INIT_SOURCED=1 - . $HOME/.nix-profile/etc/profile.d/nix.sh + . "${config.user.home}/.nix-profile/etc/profile.d/nix.sh" # workaround for nix 2.4, see https://github.com/NixOS/nixpkgs/issues/149791 ${addToNixPath "${config.user.home}/.nix-defexpr/channels"} @@ -33,8 +33,8 @@ let ${addToNixPath "nixpkgs=${config.user.home}/.nix-defexpr/channels/nixpkgs/"} ${optionalString (config.home-manager.config != null) '' - if [ -e "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then - . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" + if [ -e "${config.user.home}/.nix-profile/etc/profile.d/hm-session-vars.sh" ]; then + . "${config.user.home}/.nix-profile/etc/profile.d/hm-session-vars.sh" fi ''}