Support for nix home-manager

This commit is contained in:
2022-03-28 12:12:32 -07:00
parent d49d5d0061
commit dd724ae057
2 changed files with 43 additions and 1 deletions

View File

@@ -3,10 +3,17 @@ from xonsh.platform import ON_DARWIN
# Nix integration
nix_daemon_path = p"/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
if nix_daemon_path.exists():
source-bash @(nix_daemon_path)
source-bash --suppress-skip-message @(nix_daemon_path)
# Nix-darwin integration
if ON_DARWIN:
nix_darwin_path = p"/etc/static/bashrc"
if nix_darwin_path.exists():
source-bash @(nix_darwin_path)
$NIX_PATH="$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels"
# Home Manager
home_manager_shell_path = p"$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
if home_manager_shell_path.exists():
source-bash --suppress-skip-message @(home_manager_shell_path)