NixOS-Config/modules/home/programs/terminal/zsh/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
2024-10-09 03:36:08 -04:00
{
2024-09-23 16:22:01 -04:00
programs.zsh = {
2024-08-24 22:16:51 -04:00
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
plugins = [ "git" ];
2024-08-24 22:16:51 -04:00
};
shellAliases = {
# NixOS aliases
2024-11-19 13:20:34 -05:00
flakedate = "doas nix flake update /etc/nixos";
nhs = "doas nh os switch -R";
nhu = "flakedate && nhs";
ns = "nix-shell -p";
nixclean = "doas nix-store --gc; nix-collect-garbage -d";
nixpurge = "doas nix-collect-garbage --delete-old";
nixoptimize = "doas nix store optimise";
2024-10-20 20:02:21 -04:00
nixscrub = "nixclean; nixpurge; nixoptimize";
2024-08-24 22:16:51 -04:00
# Shortcut aliases
neo = "clear && fastfetch";
ip = "ip -c";
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
nls = "/usr/bin/env ls";
cat = "${pkgs.bat}/bin/bat --paging never";
ncat = "/usr/bin/env cat";
copycat = "wl-copy <";
sunshinehost = "WAYLAND_DISPLAY=wayland-1 DISPLAY=:1 sunshine -0";
myip = "curl ifconfig.co";
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
2024-08-24 22:16:51 -04:00
};
initExtra = ''
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
2024-11-19 13:20:34 -05:00
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
2024-08-24 22:16:51 -04:00
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
setopt HIST_IGNORE_SPACE
setopt RM_STAR_WAIT
'';
};
}