{ pkgs, lib, ... }: { environment.shellAliases = { # Aliases - For when you want to save keystrokes ## Better defaults cp = "cp -i"; # Confirm before overwriting something ln = "ln -i"; # Confirm before overwriting something mv = "mv -i"; # Confirm before overwriting something df = "df -h"; # Human-readable sizes free = "free -m"; # Show sizes in MB ls = "ls -h --color=auto"; # Human readable, Color sudo = lib.mkDefault "sudo "; # ending in space allows next word to be aliased. diff = "diff --color=auto"; grep = "grep --color=auto"; ip = "ip --color=auto"; dir = "dir --color=auto"; md = "mkdir"; # shit = "sudo !!"; lswifi = "nmcli device wifi list --rescan yes"; pip3s = "pip3 search"; pip3i = "pip3 install"; pms = "nix search"; # Package manager search. Was originally pacman search, but works equally we ll for this . pmi = " nix-env -iA"; # Package manager install. Installs imperitively to user pmiu = "nix-env -f channel:nixos-unstable -iA"; # Same as above but unstable channel pmis = "nix-env -i"; # the s stands for... slow, sketchy, something sshfs = "sshfs -o auto_unmount -o reconnect"; sshfsc = "sshfs -o auto_unmount -o reconnect -o auto_cache"; ## Shortcuts to Common Args ### NixOS stuff rebuild = "sudo nixos-rebuild test"; rebuild-lock = "sudo nixos-rebuild switch"; nsp = "nix-shell -p"; # nix-index-update = "${pkgs.nix-index}/bin/nix-index"; nt = "nix-top"; ## Full File search ffs = "grep --line-buffered --color=never -r '' * | ${pkgs.fzf}/bin/fzf"; ### ls la = "ls -Ah --color=auto"; # Show hidden files ll = "ls -lh --color=auto"; # Show file size, modified date lla = "ls -lAh --color=auto"; # Show everything ## Lighternet # gopher = "${pkgs.ncgopher}/bin/ncgopher"; # gemini = "${pkgs.amfora}/bin/amfora"; ### Taskwarrior # twa = "${pkgs.taskwarrior}/bin/task add"; # twm = "${pkgs.taskwarrior}/bin/task modify"; ### IPFS #ipfs = "sudo -u ipfs ipfs"; nixed = "nano /etc/nixos/configuration.nix"; cdnix = "cd /etc/nixos/"; aliased = "nano $HOME/.alias && source $HOME/.alias"; # Same but alias and functions zshed = "nano $HOME/.zshrc && source $HOME/.zshrc"; # Edit zshrc then source it ## Moving Around "cd.." = "cd .."; "cd..." = "cd ../.."; "cd...."= "cd ../../.."; "cd....." = "cd ../../../.."; "cd......" = "cd ../../../../.."; lsgrep = "ls -a | grep -i"; hgrep = "history | grep -i"; psgrep = "ps aux | grep -i"; wget = "${pkgs.wget}/bin/wget -c"; chown = "chown --preserve-root"; chmod = "chmod --preserve-root"; chgrp = "chgrp --preserve-root"; # app shortcuts # what = "${pkgs.goldendict}/bin/goldendict";# Instant lookup in dictionary or wikipedia ydl = "${pkgs.yt-dlp}/bin/yt-dlp"; # ydlp = "${pkgs.yt-dlp}/bin/yt-dlp --proxy socks5://127.0.0.1:9090"; # ydlp2 = "${pkgs.yt-dlp}/bin/yt-dlp --proxy socks5://127.0.0.1:9091"; ydlm = "${pkgs.yt-dlp}/bin/yt-dlp -o '%(artist)s-%(title)s.%(ext)s' --add-metadata -x --audio-quality 0"; ydlmp = "${pkgs.yt-dlp}/bin/yt-dlp -o '%(artist)s-%(album)s/%(playlist_index)s-%(artist)s-%(title)s.%(ext)s' --add-metadata -x --audio-quality 0"; youtube-dl = "${pkgs.yt-dlp}/bin/yt-dlp"; }; }