44 lines
1.4 KiB
Nix
44 lines
1.4 KiB
Nix
{ pkgs, ... }:
|
|
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
oh-my-zsh = {
|
|
enable = true;
|
|
theme = "agnoster";
|
|
plugins = [ "git" ];
|
|
};
|
|
shellAliases = {
|
|
# NixOS aliases
|
|
flakedate = "doas nix flake update --flake /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";
|
|
nixscrub = "nixclean; nixpurge; nixoptimize";
|
|
|
|
# Shortcut aliases
|
|
ff = "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 <";
|
|
myip = "curl ifconfig.co";
|
|
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
|
};
|
|
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
|
|
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
|
setopt HIST_IGNORE_SPACE
|
|
setopt RM_STAR_WAIT
|
|
'';
|
|
};
|
|
}
|