configuration.nix/home/programs/zsh.nix

29 lines
847 B
Nix
Raw Normal View History

{ config, pkgs, lib, ... }: {
2023-04-07 19:09:05 +05:30
programs.zsh = {
enable = true;
defaultKeymap = "viins";
2024-03-18 21:42:12 +05:30
autosuggestion.enable = true;
2023-04-07 19:09:05 +05:30
enableCompletion = true;
2023-07-01 11:49:27 +05:30
syntaxHighlighting.enable = true;
2023-04-07 19:09:05 +05:30
history = {
expireDuplicatesFirst = true;
extended = true;
ignoreDups = true;
ignoreSpace = true;
2023-04-07 19:09:05 +05:30
path = "${config.xdg.dataHome}/zsh/zsh_history";
};
envExtra = lib.optionalString config.services.gnome-keyring.enable ''export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/keyring/ssh"'';
2023-04-07 19:09:05 +05:30
initExtra = ''
bindkey -v '^?' backward-delete-char
'';
shellAliases = {
2023-08-05 10:55:31 +05:30
cat = "${pkgs.bat}/bin/bat";
2023-04-07 19:09:05 +05:30
cp = "cp -v";
grep = "grep --color=auto";
ln = "ln -v";
mv = "mv -v";
2024-01-04 21:51:29 +05:30
rebuild_system = "sudo nixos-rebuild --flake /persist/home/.config/nixos#Skipper --cores 0";
2023-04-07 19:09:05 +05:30
};
};
}