NixOS-Config/home-manager/tuiapps/zsh.nix

58 lines
1.9 KiB
Nix
Raw Normal View History

2024-09-10 15:29:32 -04:00
{pkgs, config, ...}: {
2024-08-24 22:16:51 -04:00
programs.zsh = let
auth = import ../common/auth.nix;
nixcfg = import ../common/nixcfg.nix;
in {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
2024-08-24 22:16:51 -04:00
plugins = ["git"];
};
shellAliases = {
# NixOS aliases
nixcfg = "${nixcfg.open}";
2024-09-10 15:42:37 -04:00
nixclean = "${auth.method} nix-store --gc; nix-collect-garbage -d";
nixpurge = "${auth.method} nix-collect-garbage --delete-old";
nixoptimize = "${auth.method} nix store optimise";
2024-08-24 22:16:51 -04:00
2024-09-10 15:29:32 -04:00
# Flake commands
flakedate = "${auth.method} nix flake update /etc/nixos";
sysswitch = "${auth.method} nixos-rebuild switch --flake /etc/nixos";
homeswitch = "home-manager switch --flake /etc/nixos";
2024-09-10 15:42:37 -04:00
nixswitch = "sysswitch; homeswitch";
nixdate = "flakedate && sysswitch; homeswitch";
2024-09-10 15:29:32 -04:00
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";
2024-09-11 22:58:25 -04:00
svim = "sudo $(which vim)";
2024-08-24 22:16:51 -04:00
copycat = "wl-copy <";
sunshinehost = "WAYLAND_DISPLAY=wayland-1 DISPLAY=:1 sunshine -0";
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
# Curl tools
myip = "curl ifconfig.co";
# Download from sources
ytdl = "yt-dlp --embed-thumbnail --embed-metadata --output \"%(title)s.%(ext)s\"";
ytmp4 = "ytdl --recode-video webm";
ytm3u = "yt-dlp -gS proto:m3u8";
opusdl = "ytdl --recode-video opus";
ytopus = "opusdl --format 251";
spotdl = "spotdl --m3u --format opus";
};
initExtra = ''
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
setopt HIST_IGNORE_SPACE
setopt RM_STAR_WAIT
'';
};
}