configuration.nix/home/programs/zsh.nix

32 lines
806 B
Nix
Raw Normal View History

2023-04-07 19:09:05 +05:30
{ config, pkgs, ... }: {
programs.zsh = {
enable = true;
defaultKeymap = "viins";
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
history = {
expireDuplicatesFirst = true;
extended = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
};
initExtra = ''
bindkey -v '^?' backward-delete-char
'';
profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
2023-04-27 22:44:21 +05:30
exec ${pkgs.hyprland}/bin/Hyprland
2023-04-07 19:09:05 +05:30
fi
'';
shellAliases = {
cat = "bat";
cd = "z";
cp = "cp -v";
grep = "grep --color=auto";
ln = "ln -v";
mv = "mv -v";
2023-04-19 22:06:00 +05:30
rebuild_system = "sudo nixos-rebuild --flake /persist/home/.nixos-config#Skipper --cores 0";
2023-04-07 19:09:05 +05:30
};
};
}