This commit is contained in:
zack 2024-12-19 21:47:51 -05:00
parent ed77ae6e6b
commit bf86126a00
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
22 changed files with 1490 additions and 243 deletions

View file

@ -0,0 +1,49 @@
{
pkgs,
lib,
config,
...
}:
with lib;
with pkgs; {
ytmp3 = ''
${getExe yt-dlp} -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s"'';
cat = "${getExe bat} --style=plain";
vpn = "mullvad";
uuid = "cat /proc/sys/kernel/random/uuid";
grep = getExe ripgrep;
fzf = getExe skim;
untar = "tar -xvf";
untargz = "tar -xzf";
du = getExe du-dust;
ps = getExe procs;
lb = "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\"";
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
m = "mkdir -p";
fcd = "cd $(find -type d | fzf)";
l = "ls -lF --time-style=long-iso --icons";
sc = "sudo systemctl";
scu = "systemctl --user ";
la = "${getExe eza} -lah --tree";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
tree = "${getExe eza} --tree --icons --tree";
kys = "shutdown now";
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
tsm = "transmission-remote";
g = "git";
n = "nix";
r = "rebuild";
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
mnt = "udisksctl mount -b";
umnt = "udisksctl unmount -b";
burn = "pkill -9";
diff = "diff --color=auto";
wu = "vpn disconnect -w && awsvpnclient start --config ~/Downloads/cvpn-endpoint-085400ccc19bb4a17.ovpn";
"v" = "nvim";
".." = "cd ..";
"..." = "cd ../../";
"...." = "cd ../../../";
"....." = "cd ../../../../";
"......" = "cd ../../../../../";
}

View file

@ -0,0 +1,144 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.shells.fish;
in {
options.shells.fish = with types; {
enable = mkBoolOpt false "Enable Fish Configuration";
};
config = mkIf cfg.enable {
programs.fish = {
enable = true;
generateCompletions = true;
interactiveShellInit = ''
set -gx LC_ALL en_US.UTF-8
set -gx SSH_AUTH_SOCK /run/user/1000/keyring/ssh
set -gx FLAKE /home/zoey/nixos/
set -g FZF_PREVIEW_FILE_CMD "head -n 10"
set -g FZF_PREVIEW_DIR_CMD "ls"
'';
plugins = [
{
name = "foreign-env";
src = pkgs.fishPlugins.foreign-env.src;
}
{
name = "fzf.fish";
src = pkgs.fishPlugins.fzf-fish.src;
}
{
name = "z";
src = pkgs.fishPlugins.z.src;
}
{
name = "done";
src = pkgs.fishPlugins.done.src;
}
{
name = "colored-man-pages";
src = pkgs.fishPlugins.colored-man-pages.src;
}
];
functions = {
pf = ''
fzf --bind ctrl-y:preview-up,ctrl-e:preview-down \
--bind ctrl-b:preview-page-up,ctrl-f:preview-page-down \
--bind ctrl-u:preview-half-page-up,ctrl-d:preview-half-page-down \
--bind ctrl-k:up,ctrl-j:down \
--preview='bat --style=numbers --color=always --line-range :100 {}'
'';
ff = ''
for file in (pf)
set cmd "v $file"
echo $cmd
eval $cmd
end
'';
};
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
};
home.packages = with pkgs; [
gnumake
# Runs programs without installing them
comma
# grep replacement
ripgrep
# ping, but with cool graph
gping
fzf
# dns client
dogdns
# neofetch but for git repos
onefetch
# neofetch but for cpu's
cpufetch
# download from yt and other websites
yt-dlp
zsh-history
# man pages for tiktok attention span mfs
tealdeer
# markdown previewer
glow
# profiling tool
hyperfine
imagemagick
ffmpeg-full
# preview images in terminal
catimg
# networking stuff
nmap
wget
# faster find
fd
# http request thingy
xh
# generate regex
grex
# json thingy
jq
# syncthnig for acoustic people
rsync
figlet
# Generate qr codes
qrencode
# script kidde stuff
hcxdumptool
hashcat
unzip
];
};
}