feat(nix): migrate bash

This commit is contained in:
Stefan Imhoff
2024-07-29 15:33:42 +02:00
parent 3a0ab67db1
commit 53140e5556
3 changed files with 41 additions and 2 deletions

39
nix/home/bash/default.nix Normal file
View File

@@ -0,0 +1,39 @@
{ pkgs, ... }:
{
programs.bash = {
enable = true;
enableCompletion = true;
sessionVariables = {
SSH_AUTH_SOCK = "$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
FD_OPTIONS = "--follow --exclude .git --exclude node_modules";
KEYTIMEOUT = 1;
GIT_EDITOR = "nvim";
EDITOR = "nvim";
FZF_DEFAULT_COMMAND = "git ls-files --cached --others --exclude-standard | fd --hidden --type f --type l $FD_OPTIONS";
FZF_DEFAULT_OPTS = "--no-height";
FZF_CTRL_T_COMMAND = "$FZF_DEFAULT_COMMAND";
FZF_CTRL_T_OPTS = "--preview 'bat --color=always --style=numbers {}' --bind shift-up:preview-page-up,shift-down:preview-page-down";
FZF_CTRL_R_OPTS = "--reverse";
FZF_TMUX_OPTS = "-p";
FZF_ALT_C_COMMAND = "fd --type d $FD_OPTIONS --color=never --hidden";
FZF_ALT_C_OPTS = "--preview 'tree -C {} | head -50'";
};
shellAliases = {
".." = "cd ..";
};
shellOptions = [
"histappend"
"checkwinsize"
"extglob"
"globstar"
"checkjobs"
];
historyControl = [
"erasedups"
"ignorespace"
];
historyFileSize = 100000;
historySize = 10000;
};
}

View File

@@ -9,6 +9,7 @@ in
./ack
./ag
./asdf
./bash
./bat
./ctags
./curl
@@ -82,7 +83,6 @@ in
# environment.
home.packages = with pkgs; [
atuin # Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines
bash # GNU Bourne-Again Shell, the de facto standard shell on Linux
bfg-repo-cleaner # Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster
btop # Monitor of resources
bzip2 # High-quality data compression program

View File

@@ -4,7 +4,7 @@
programs.lsd =
{
enable = true;
enableAliases = true;
enableAliases = false;
settings = {
classic = false;
blocks = [