nixos-config/nixos/homes/common/terminal.nix
2024-01-14 21:03:18 +01:00

59 lines
1.3 KiB
Nix

{ lib, pkgs, ... }:
{
programs.zsh = {
enable = true;
defaultKeymap = lib.mkDefault "viins";
};
programs.bash = {
enable = true;
bashrcExtra = ''
set -o vi
'';
};
programs.thefuck.enable = true;
# a better cat
programs.bat = {
enable = true;
config.theme = "gruvbox-light";
};
home.shellAliases.cat = "${pkgs.bat}/bin/bat --theme='gruvbox-light'";
home.shellAliases.llt = "${pkgs.eza}/bin/exa -a --tree";
# use z instead of cd
# use zi to fuzzy search through all registered directories
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
# provide better `Ctrl+r` command in terminal
#programs.mcfly = {
# enable = true;
# keyScheme = "vim";
# fuzzySearchFactor = 3;
# enableZshIntegration = true;
# enableBashIntegration = true;
#};
# provide better `Ctrl+r` command in terminal
programs.atuin = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
package = pkgs.atuin.overrideAttrs (_old: {
# as cursed as doing mitigations=off in the kernel command line
patches = [ ./0001-make-atuin-on-zfs-fast-again.patch ];
});
settings = {
auto_sync = true;
sync_frequency = "5m";
sync_address = "http://chungus.private:8888";
search_mode = "skim";
};
};
}