1
0
mirror of https://github.com/Andrey0189/nixos-config-reborn.git synced 2025-09-15 10:06:00 +03:00
Files
nixos-config-reborn/home-manager/modules/zsh.nix
andrey_varnavskiy a528b53f10 r = ranger
2024-12-18 17:43:09 +05:00

47 lines
1.1 KiB
Nix

{ config, ... }: {
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases =
let
flakeDir = "~/flake";
in {
sw = "nh os switch";
upd = "nh os switch --update";
hms = "nh home switch";
pkgs = "nvim ${flakeDir}/nixos/packages.nix";
r = "ranger";
v = "nvim";
se = "sudoedit";
microfetch = "microfetch && echo";
gs = "git status";
ga = "git add";
gc = "git commit";
gp = "git push";
".." = "cd ..";
};
history.size = 10000;
history.path = "${config.xdg.dataHome}/zsh/history";
initExtra = ''
# Start Tmux automatically if not already running. No Tmux in TTY
if [ -z "$TMUX" ] && [ -n "$DISPLAY" ]; then
tmux attach-session -t default || tmux new-session -s default
fi
# Start UWSM
if uwsm check may-start > /dev/null && uwsm select; then
exec systemd-cat -t uwsm_start uwsm start default
fi
'';
};
}