mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-19 07:54:28 +01:00
35 lines
847 B
Nix
35 lines
847 B
Nix
{
|
|
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;
|
|
|
|
programs.nushell = {
|
|
enable = true;
|
|
package = pkgs-unstable.nushell;
|
|
configFile.source = ./config.nu;
|
|
inherit shellAliases;
|
|
};
|
|
|
|
programs.bash = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
bashrcExtra = ''
|
|
export PATH="$PATH:${localBin}:${goBin}:${rustBin}"
|
|
'';
|
|
};
|
|
}
|