bash ~ zsh wip
This commit is contained in:
@@ -2,14 +2,46 @@
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) fd fzf;
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
||||
shellType = osConfig.my.shell.type;
|
||||
commonInit = ''
|
||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||
export command_timeout=60
|
||||
'';
|
||||
commonAliases = {
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
mkdir = "mkdir -p";
|
||||
mkcd = "(){ mkdir -p \"$1\" && cd \"$1\" }";
|
||||
copy = "xclip -selection clipboard";
|
||||
cdp = "pwd | copy";
|
||||
cfp = "(){ readlink -f \"$1\" | copy }";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
".3" = "cd ../../..";
|
||||
".4" = "cd ../../../..";
|
||||
".5" = "cd ../../../../..";
|
||||
c = "cat";
|
||||
sc = "systemctl --user";
|
||||
jc = "journalctl --user -xefu";
|
||||
open-gallery = ''
|
||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||
xdg-open "$(${fd}/bin/fd . ./ Husbands wikifeet -tdirectory -d 1 | ${fzf}/bin/fzf -i)"'';
|
||||
};
|
||||
in
|
||||
{
|
||||
home.stateVersion = "23.05";
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableBashIntegration = shellType == "bash";
|
||||
enableZshIntegration = shellType == "zsh";
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
git = {
|
||||
@@ -17,45 +49,30 @@
|
||||
userName = "Danilo Reyes";
|
||||
userEmail = "CaptainJawZ@protonmail.com";
|
||||
};
|
||||
bash =
|
||||
let
|
||||
inherit (pkgs) fd fzf;
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
||||
historyControl = [
|
||||
"erasedups"
|
||||
"ignorespace"
|
||||
"ignoredups"
|
||||
];
|
||||
shellAliases = {
|
||||
cp = "cp -i";
|
||||
mv = "mv -i";
|
||||
mkdir = "mkdir -p";
|
||||
mkcd = "(){ mkdir -p \"$1\" && cd \"$1\" }";
|
||||
copy = "xclip -selection clipboard";
|
||||
cdp = "pwd | copy";
|
||||
cfp = "(){ readlink -f \"$1\" | copy }";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
".3" = "cd ../../..";
|
||||
".4" = "cd ../../../..";
|
||||
".5" = "cd ../../../../..";
|
||||
c = "cat";
|
||||
sc = "systemctl --user";
|
||||
jc = "journalctl --user -xefu";
|
||||
open-gallery = ''
|
||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||
xdg-open "$(${fd}/bin/fd . ./ Husbands wikifeet -tdirectory -d 1 | ${fzf}/bin/fzf -i)"'';
|
||||
};
|
||||
enableVteIntegration = true;
|
||||
initExtra = ''
|
||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||
export command_timeout=60
|
||||
'';
|
||||
bash = lib.mkIf (shellType == "bash") {
|
||||
enable = true;
|
||||
historyFile = "\${XDG_STATE_HOME}/bash/history";
|
||||
shellAliases = commonAliases;
|
||||
enableVteIntegration = true;
|
||||
initExtra = commonInit;
|
||||
historyControl = [
|
||||
"erasedups"
|
||||
"ignorespace"
|
||||
"ignoredups"
|
||||
];
|
||||
};
|
||||
zsh = lib.mkIf (shellType == "zsh") {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
shellAliases = commonAliases;
|
||||
initContent = commonInit;
|
||||
history = {
|
||||
path = "\${XDG_STATE_HOME}/zsh/history";
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreSpace = true;
|
||||
ignoreAllDups = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user