configuration.nix/home/modules/programs/zsh/default.nix

36 lines
1014 B
Nix
Raw Permalink Normal View History

2023-11-18 10:51:24 +01:00
{ pkgs, ... }:
2023-11-14 15:50:11 +01:00
{
2023-11-18 10:51:24 +01:00
programs.zsh = {
enable = true;
2024-06-28 11:14:36 +02:00
dotDir = ".config/zsh";
defaultKeymap = "viins";
enableVteIntegration = true;
2023-11-18 10:51:24 +01:00
syntaxHighlighting.enable = true;
2024-04-02 09:42:28 +02:00
autosuggestion.enable = true;
2023-11-18 10:51:24 +01:00
loginExtra = ''
[ "$(tty)" = "/dev/tty1" ] && exec sway
'';
2024-06-28 11:14:36 +02:00
sessionVariables = {
TERM = "screen-256color";
};
2023-11-18 10:51:24 +01:00
shellAliases = {
cal = "cal $(date +%Y)";
2023-11-19 14:05:39 +01:00
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD";
2023-11-18 10:51:24 +01:00
gad = "git add . && git diff --cached";
gac = "ga && gc";
gach = "gac -C HEAD";
ga = "git add .";
gc = "git commit";
dev = "nix develop --command $SHELL";
2024-06-03 10:39:58 +02:00
ls = "${pkgs.nushell}/bin/nu -c 'ls'";
la = "${pkgs.nushell}/bin/nu -c 'ls -al'";
2023-11-18 10:51:24 +01:00
torrent = "transmission-remote";
vi = "nvim";
2024-06-03 15:05:33 +02:00
sc = "systemctl";
2023-11-18 10:51:24 +01:00
};
2024-06-28 11:14:36 +02:00
shellGlobalAliases.comp = "-vcodec libx265 -crf 28";
history.expireDuplicatesFirst = true;
historySubstringSearch.enable = true;
2023-11-14 15:50:11 +01:00
};
}