mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 08:32:39 +02:00
feat: update for shells
This commit is contained in:
@@ -1,16 +0,0 @@
|
|||||||
_: {
|
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
bashrcExtra = ''
|
|
||||||
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
|
||||||
'';
|
|
||||||
|
|
||||||
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()))'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./nushell
|
./shells
|
||||||
./tmux
|
./tmux
|
||||||
./zellij
|
./zellij
|
||||||
|
|
||||||
./bash.nix
|
|
||||||
./bat.nix
|
./bat.nix
|
||||||
./btop.nix
|
./btop.nix
|
||||||
./core.nix
|
./core.nix
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{config, ...}: {
|
|
||||||
programs.nushell = {
|
|
||||||
enable = true;
|
|
||||||
configFile.source = ./config.nu;
|
|
||||||
|
|
||||||
# home-manager will merge the cotent in `environmentVariables` with the `envFile.source`
|
|
||||||
# but basically, I set all environment variables via the shell-independent way, so I don't need to use those two options
|
|
||||||
#
|
|
||||||
# envFile.source = ./env.nu;
|
|
||||||
# environmentVariables = { FOO="bar"; };
|
|
||||||
|
|
||||||
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()))'";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
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()))'";
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# only works in bash/zsh, not nushell
|
||||||
|
home.shellAliases = shellAliases;
|
||||||
|
|
||||||
|
programs.nushell = {
|
||||||
|
enable = true;
|
||||||
|
configFile.source = ./config.nu;
|
||||||
|
shellAliases = shellAliases;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
bashrcExtra = ''
|
||||||
|
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
../base/desktop
|
../base/desktop
|
||||||
|
|
||||||
./proxychains
|
./proxychains
|
||||||
|
|
||||||
./core.nix
|
./core.nix
|
||||||
./rime-squirrel.nix
|
./rime-squirrel.nix
|
||||||
|
./shell.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
_: {
|
||||||
|
# add homebrew into PATH
|
||||||
|
|
||||||
|
programs.bash.bashrcExtra = ''
|
||||||
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
|
'';
|
||||||
|
programs.zsh.envExtra = ''
|
||||||
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user