fix: nushell's PATH on darwin

This commit is contained in:
Ryan Yin
2023-07-06 17:02:26 +08:00
parent bb2c967981
commit 0193f84847
2 changed files with 18 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
./alacritty
./core.nix
./nushell.nix
];
# Home Manager needs a bit of information about you and the

17
home/darwin/nushell.nix Normal file
View File

@@ -0,0 +1,17 @@
{ config, ... }: {
# nix-darwin do not set PATH for nushell! so we need to do it manually
# this is a workaround to add nix's PATH to nushell
programs.nushell.extraConfig = ''
let-env PATH = ([
"${config.home.homeDirectory}/bin"
"${config.home.homeDirectory}/.local/bin"
"${config.home.homeDirectory}/go/bin"
"${config.home.homeDirectory}/.nix-profile/bin"
"/etc/profiles/per-user/admin/bin"
"/run/current-system/sw/bin"
"/nix/var/nix/profiles/default/bin"
($env.PATH | split row (char esep))
] | flatten)
'';
}