configuration.nix/home/programs/zsh.nix

41 lines
994 B
Nix
Raw Normal View History

2023-05-18 16:11:26 +05:30
{
config,
pkgs,
...
}: {
2023-04-07 19:09:05 +05:30
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
'';
2023-06-10 14:07:42 +05:30
profileExtra =
if pkgs.stdenv.isLinux
then ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${pkgs.hyprland}/bin/Hyprland
fi
''
else "";
2023-04-07 19:09:05 +05:30
shellAliases = {
cat = "bat";
cp = "cp -v";
grep = "grep --color=auto";
ln = "ln -v";
mv = "mv -v";
2023-06-10 14:07:42 +05:30
rebuild_system =
if pkgs.stdenv.isLinux
then "sudo nixos-rebuild --flake /persist/home/.nixos-config#Skipper --cores 0"
else "home-manager --flake /Users/adtya/Projects/nixos-config#adtya@Alex --cores 0";
2023-04-07 19:09:05 +05:30
};
};
}