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 = {
2024-12-08 06:41:06 -05:00
# NixOS
flakedate = "sudo nix flake update --flake /etc/nixos";
nhs = "sudo nh os switch -R /etc/nixos";
2024-11-19 13:20:34 -05:00
nhu = "flakedate && nhs";
ns = "nix-shell -p";
2024-12-08 06:41:06 -05:00
nixclean = "sudo nix-store --gc; nix-collect-garbage -d";
nixpurge = "sudo nix-collect-garbage --delete-old";
nixoptimize = "sudo nix store optimise";
2024-10-20 20:02:21 -04:00
nixscrub = "nixclean; nixpurge; nixoptimize";
2024-08-24 22:16:51 -04:00
2024-12-08 06:41:06 -05:00
# Shortcuts
2024-11-24 21:25:03 -05:00
ff = "clear && fastfetch";
2024-08-24 22:16:51 -04:00
ip = "ip -c";
ls = "${pkgs.eza}/bin/eza -a --color=always --group-directories-first --icons";
cat = "${pkgs.bat}/bin/bat --paging never";
copycat = "wl-copy <";
myip = "curl ifconfig.co";
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
2024-12-08 06:41:06 -05:00
# Deny
rm = ''echo "Use trash."; false'';
2024-08-24 22:16:51 -04:00
};
initExtra = ''
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
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
setopt HIST_IGNORE_SPACE
setopt RM_STAR_WAIT
'';
};
}