forked from foxora/nix
89 lines
2.5 KiB
Nix
89 lines
2.5 KiB
Nix
{ upkgs, ... }:
|
|
{
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
|
|
plugins = [
|
|
{
|
|
name = "vi-mode";
|
|
src = upkgs.zsh-vi-mode;
|
|
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
|
}
|
|
];
|
|
|
|
initContent = ''
|
|
# yazi wrapper!!!
|
|
function yazi() {
|
|
local tmp="$(mktemp -p "/run/user/$UID" -t "yazi-cwd.XXXXXXXX")" cwd
|
|
command yazi "$@" --cwd-file="$tmp"
|
|
IFS= read -r -d ''' cwd < "$tmp"
|
|
[ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd"
|
|
rm -f -- "$tmp"
|
|
}
|
|
|
|
# oh i'm so gay!! :3
|
|
function hf() {
|
|
local queer_flags=('genderfae' 'lesbian' 'xenogender' 'transgender' 'transfeminine' 'transbian')
|
|
local ascii_art=('fox-1.txt' 'fox-2.txt' 'fox-3.txt' 'blackhole-1.txt' 'butterfly-4.txt' 'butterfly-7.txt' 'flower-3.txt' 'flower-4.txt')
|
|
hyfetch --ascii-file="$XDG_DATA_HOME/ascii-art/$ascii_art[RANDOM % $#ascii_art + 1]" --preset="$queer_flags[RANDOM % $#queer_flags + 1]" --args="--config themes/laimu.jsonc"
|
|
}
|
|
hf
|
|
'';
|
|
|
|
shellAliases = {
|
|
# files and nav stuff
|
|
ls = "eza";
|
|
ll = "ls -la";
|
|
lt = "ls --tree";
|
|
llt = "ll --tree";
|
|
|
|
y = "yazi";
|
|
|
|
# cat with wings!!!
|
|
cat = "bat";
|
|
|
|
# init github keys
|
|
# description: gi = github initialize
|
|
sai = "eval \"$(ssh-agent -s)\"";
|
|
gh-auv = "ssh-add ~/.ssh/github_auroraveon";
|
|
cb-fox = "ssh-add ~/.ssh/codeberg_foxxyora";
|
|
tf-fox = "ssh-add ~/.ssh/tearforge_foxora";
|
|
|
|
# --------------------
|
|
# shorthand nix command aliases
|
|
|
|
# open nix develop with preferred shell
|
|
# description: nd = nix develop
|
|
nd = "nix develop -c $SHELL";
|
|
|
|
# description: cdns = change directory [to] nix settings
|
|
cdns = "cd ~/.nix";
|
|
# cd to /etc/nixos and edit nix config
|
|
# description: ns = nix settings
|
|
ns = "cdns && $EDITOR";
|
|
|
|
# NOTE: commands need --accept-flake-config as Cerulean uses
|
|
# experimental features
|
|
# description: nrs = nix rebuild switch
|
|
switch = "cdns && nh os switch ~/.nix --accept-flake-config";
|
|
# upgrades the system
|
|
upgrade = "cdns && nix flake update && nh os switch ./ --accept-flake-config";
|
|
|
|
# pipes are prettyyyy!!!! :3333
|
|
pipes1 = "pipes.sh -r 1024 -p 8 -f 30";
|
|
pipes2 = "pipes.sh -r 4096 -p 16 -f 100";
|
|
};
|
|
|
|
history = {
|
|
size = 16384;
|
|
};
|
|
};
|
|
|
|
programs.zsh.oh-my-zsh = {
|
|
enable = true;
|
|
theme = "agnoster";
|
|
};
|
|
}
|