{ pkgs, user, ... }: { users.users.${user}.shell = pkgs.zsh; programs.zsh.enable = true; home-manager.users.${user} = { programs.zsh = { enable = true; # TODO create directory if non existent history.path = "$HOME/zsh/history"; shellAliases = { update = "doas nixos-rebuild switch --impure"; # Docker shorthands dc = "docker compose"; dco = "docker container"; dn = "docker network"; dv = "docker volume"; code = "codium"; # Tmux shrothands # https://github.com/gabysbrain/machine_config/blob/master/config/tmux.nix ta = "tmux attach -t"; tl = "tmux list-sessions"; tks = "tmux kill-session -t"; tn = "tmux new-session -t"; #dev = "nix develop --command zsh"; dev = ''nix develop "git+file://$(pwd)?submodules=1" --command zsh''; # ssh pink = "ssh root@32.54.31.99"; cyan = "ssh 4o1x5@cyan.4o1x5.dev"; carbon = "ssh root@32.54.31.180"; # remote deployment for homelab deploy-carbon = "nixos-rebuild switch --flake .#carbon --target-host root@32.54.31.180 --show-trace"; deploy-pink = "nixos-rebuild switch --flake .#pink --target-host root@32.54.31.99 --show-trace"; deploy-cyan = "nixos-rebuild switch --flake .#cyan --target-host root@37.221.212.150 --show-trace"; }; initExtra = '' PROMPT="[%M] %~ " ''; sessionVariables = { EDITOR = "nvim"; # https://discourse.nixos.org/t/tmux-doesnt-use-tmux-config-generated-by-nix/42392/2 # for some reason tmux nix doesnt configure tmux right so I have to manually set it's configuration path # btw this is probably due to tmux looking for the user level tmux config at ~/.config/tmux rather than the system wide one ZSH_TMUX_CONFIG = "/etc/tmux.conf"; }; antidote = { enable = true; plugins = [ "marlonrichert/zsh-autocomplete" "zsh-users/zsh-syntax-highlighting" ]; }; }; }; }