2022-07-22 20:42:05 +00:00
|
|
|
{pkgs, ...}: let
|
|
|
|
inputrc = pkgs.writeText "inputrc" ''
|
|
|
|
set completion-ignore-case on
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
home-manager.users.buffet = {
|
|
|
|
home.sessionVariables = {
|
|
|
|
INPUTRC = inputrc;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.bash = {
|
|
|
|
enable = true;
|
|
|
|
historyControl = ["erasedups" "ignorespace"];
|
|
|
|
|
|
|
|
shellAliases = {
|
|
|
|
"cd.." = "cd ..";
|
2022-10-04 19:53:32 +00:00
|
|
|
ch = "ssh -t irc.buffet.sh -- screen -r weechat";
|
2022-07-22 20:42:05 +00:00
|
|
|
htop = "htop -t";
|
|
|
|
mkdir = "mkdir -p";
|
|
|
|
rg = "rg -S";
|
2023-08-13 17:23:02 +00:00
|
|
|
update = let
|
|
|
|
change-message = pkgs.writeScript "change-commit-message" ''
|
|
|
|
#!/bin/sh
|
|
|
|
sed -i '1s/.*/chore: update/' "$1"
|
|
|
|
'';
|
|
|
|
in "nix flake update --commit-lock-file && EDITOR=${change-message} git commit --amend";
|
2022-07-22 20:42:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
shellOptions = [
|
|
|
|
"cdspell"
|
|
|
|
"checkjobs"
|
|
|
|
"extglob"
|
|
|
|
"globstar"
|
|
|
|
"histappend"
|
|
|
|
"nocaseglob"
|
|
|
|
];
|
|
|
|
|
|
|
|
initExtra = ''
|
2023-04-21 21:03:22 +00:00
|
|
|
PS0='\[\e[0m\]'
|
|
|
|
PS1='\[\e[1m\] '
|
2023-01-06 16:45:36 +00:00
|
|
|
|
2023-03-06 12:27:46 +00:00
|
|
|
bind '"\C-o": "\C-a\C-k fg; if [[ $? == 1 ]]; then nvim; fi\n"'
|
2023-01-06 16:45:36 +00:00
|
|
|
bind '"\e\C-m": "\C-e | nvim\C-m"'
|
2022-07-22 20:42:05 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|