refactor: add localBin, goBin & rustBin into PATH env

This commit is contained in:
Ryan Yin
2024-09-16 12:42:41 +08:00
parent 5895d7c97d
commit 2abea4e387
3 changed files with 14 additions and 6 deletions

View File

@@ -1,10 +1,18 @@
{pkgs-unstable, ...}: let
{
config,
pkgs-unstable,
...
}: let
shellAliases = {
k = "kubectl";
urldecode = "python3 -c 'import sys, urllib.parse as ul; print(ul.unquote_plus(sys.stdin.read()))'";
urlencode = "python3 -c 'import sys, urllib.parse as ul; print(ul.quote_plus(sys.stdin.read()))'";
};
localBin = "${config.home.homeDirectory}/.local/bin";
goBin = "${config.home.homeDirectory}/go/bin";
rustBin = "${config.home.homeDirectory}/.cargo/bin";
in {
# only works in bash/zsh, not nushell
home.shellAliases = shellAliases;
@@ -20,7 +28,7 @@ in {
enable = true;
enableCompletion = true;
bashrcExtra = ''
export PATH="$HOME/.local/bin:$HOME/go/bin:$PATH"
export PATH="$PATH:${localBin}:${goBin}:${rustBin}"
'';
};
}