move to nushell

This commit is contained in:
zack 2025-05-19 18:28:46 -04:00
parent fdd9dd20ae
commit caf9810290
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
24 changed files with 521 additions and 469 deletions

View file

@ -17,16 +17,13 @@ with pkgs; {
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";
m = "mkdir";
l = "exa -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\"";
@ -37,11 +34,8 @@ with pkgs; {
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 ../../";

View file

@ -17,47 +17,35 @@ in {
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/"
$env.config.show_banner = false
# 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 {}'
if ('TMUX' in $env == false) {
exec tmux
}
def ff [] {
let files = (pf)
for file in $files {
let cmd = $"v ($file)"
echo $cmd
nu -c $cmd
}
}
fastfetch --config minimal
'';
# Nushell handles plugins differently, you might want to use modules instead
# or configure external tools directly
extraEnv = ''
# Add any environment-specific configuration here
# Environment variables
$env.LC_ALL = "en_US.UTF-8"
$env.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
$env.FLAKE = "/home/zoey/nixos/"
# FZF settings
$env.FZF_PREVIEW_FILE_CMD = "head -n 10"
$env.FZF_PREVIEW_DIR_CMD = "ls"
'';
# Import aliases (you'll need to convert fish aliases to Nushell format)
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
};
programs.carapace.enable = true;
programs.carapace.enableNushellIntegration = true;
home.packages = with pkgs; [
gnumake
comma