updatez
This commit is contained in:
parent
ed77ae6e6b
commit
bf86126a00
22 changed files with 1490 additions and 243 deletions
49
modules/home/shells/fish/aliases.nix
Normal file
49
modules/home/shells/fish/aliases.nix
Normal 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 ../../../../../";
|
||||
}
|
||||
144
modules/home/shells/fish/default.nix
Normal file
144
modules/home/shells/fish/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
||||
51
modules/home/shells/nu/aliases.nix
Normal file
51
modules/home/shells/nu/aliases.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
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";
|
||||
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
||||
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";
|
||||
lv = "nvim -c \"normal '\''0\"";
|
||||
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 ../../../../../";
|
||||
}
|
||||
92
modules/home/shells/nu/default.nix
Normal file
92
modules/home/shells/nu/default.nix
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.custom; let
|
||||
cfg = config.shells.nu;
|
||||
in {
|
||||
options.shells.nu = with types; {
|
||||
enable = mkBoolOpt false "Enable Nushell Configuration";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
|
||||
# Nushell doesn't need generateCompletions like fish
|
||||
|
||||
extraConfig = ''
|
||||
# Environment variables
|
||||
let-env LC_ALL = "en_US.UTF-8"
|
||||
let-env SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
||||
let-env FLAKE = "/home/zoey/nixos/"
|
||||
|
||||
# FZF settings
|
||||
let-env FZF_PREVIEW_FILE_CMD = "head -n 10"
|
||||
let-env FZF_PREVIEW_DIR_CMD = "ls"
|
||||
|
||||
def 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 {}'
|
||||
}
|
||||
|
||||
def ff [] {
|
||||
let files = (pf)
|
||||
for file in $files {
|
||||
let cmd = $"v ($file)"
|
||||
echo $cmd
|
||||
nu -c $cmd
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
# Nushell handles plugins differently, you might want to use modules instead
|
||||
# or configure external tools directly
|
||||
|
||||
extraEnv = ''
|
||||
# Add any environment-specific configuration here
|
||||
'';
|
||||
|
||||
# Import aliases (you'll need to convert fish aliases to Nushell format)
|
||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
comma
|
||||
ripgrep
|
||||
gping
|
||||
fzf
|
||||
dogdns
|
||||
onefetch
|
||||
cpufetch
|
||||
yt-dlp
|
||||
zsh-history
|
||||
tealdeer
|
||||
glow
|
||||
hyperfine
|
||||
imagemagick
|
||||
ffmpeg-full
|
||||
catimg
|
||||
nmap
|
||||
wget
|
||||
fd
|
||||
xh
|
||||
grex
|
||||
jq
|
||||
rsync
|
||||
figlet
|
||||
qrencode
|
||||
hcxdumptool
|
||||
hashcat
|
||||
unzip
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue