refactoring and nushell

This commit is contained in:
Matt Nish-Lapidus 2025-06-30 02:12:23 -04:00
parent 359e58f469
commit 396aee7db9
10 changed files with 301 additions and 92 deletions

View file

@ -1,6 +1,11 @@
{ pkgs-local, pkgs-stable, inputs, pkgs, ... }:
{ config, lib, pkgs-stable, inputs, pkgs, ... }:
{
imports = [
./shell-conf/nushell/nushell.nix
./shell-conf/fish/fish.nix
];
home.packages = with pkgs; [
inputs.isd.packages.x86_64-linux.default
@ -87,6 +92,8 @@
fishPlugins.colored-man-pages
television
bash-env-json
bash-env-nushell
];
programs = {
@ -95,7 +102,6 @@
};
nix-index = {
enable = true;
enableFishIntegration = true;
};
direnv = {
enable = true;
@ -106,44 +112,10 @@
};
};
};
nushell = {
enable = true;
};
fish = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"mkdir" = "mkdir -pv";
"gt" = "gtrash";
"rm" = "gtrash put";
};
# change fzf variable search to C-M-v
interactiveShellInit = ''
bind --erase \ct
fzf_configure_bindings --variables=\e\cv
'';
plugins = [
{
name = "upto";
src = pkgs.fetchFromGitHub {
owner = "Markcial";
repo = "upto";
rev = "2d1f35453fb55747d50da8c1cb1809840f99a646";
sha256 = "sha256-Lv2XtP2x9dkIkUUjMBWVpAs/l55Ztu7gIjKYH6ZzK4s=";
};
}
];
};
zoxide = {
enableFishIntegration = true;
enableBashIntegration = true;
enable = true;
};
starship = {
enableFishIntegration = true;
enableBashIntegration = true;
enable = true;
};
ripgrep = {
@ -152,13 +124,9 @@
};
ghostty = {
enable = true;
# settings = {
# theme = "";
# };
};
wezterm = {
enable = true;
enableBashIntegration = true;
package = inputs.wezterm.packages.${pkgs.system}.default;
};
bat = {
@ -166,8 +134,6 @@
};
eza = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
git = true;
icons = "auto";
colors = "auto";
@ -177,8 +143,6 @@
};
fzf = {
enable = true;
# enableFishIntegration = false;
# enableBashIntegration = true;
};
broot = {
enable = true;

View file

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
{
programs.fish = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"mkdir" = "mkdir -pv";
"gtr" = "gtrash -r";
"rmr" = "gtrash -r";
"rm" = "gtrash put";
"lg" = "lazygit";
};
# change fzf variable search to C-M-v
interactiveShellInit = ''
bind --erase \ct
fzf_configure_bindings --variables=\e\cv
'';
plugins = [
{
name = "upto";
src = pkgs.fetchFromGitHub {
owner = "Markcial";
repo = "upto";
rev = "2d1f35453fb55747d50da8c1cb1809840f99a646";
sha256 = "sha256-Lv2XtP2x9dkIkUUjMBWVpAs/l55Ztu7gIjKYH6ZzK4s=";
};
}
];
};
}

View file

@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
{
programs.fish = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"mkdir" = "mkdir -pv";
"gtr" = "gtrash -r";
"rm" = "gtrash put";
};
# change fzf variable search to C-M-v
interactiveShellInit = ''
bind --erase \ct
fzf_configure_bindings --variables=\e\cv
'';
plugins = [
{
name = "upto";
src = pkgs.fetchFromGitHub {
owner = "Markcial";
repo = "upto";
rev = "2d1f35453fb55747d50da8c1cb1809840f99a646";
sha256 = "sha256-Lv2XtP2x9dkIkUUjMBWVpAs/l55Ztu7gIjKYH6ZzK4s=";
};
}
];
};
}

View file

@ -1,4 +0,0 @@
function lg --wraps=lazygit --description 'alias lg=lazygit'
lazygit $argv
end

View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
{
programs.nushell = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"gtr" = "gtrash -r";
"rm" = "gtrash put";
"rmr" = "gtrash -r";
"lg" = "lazygit";
};
loginFile.text = ''
${pkgs.figlet}/bin/figlet -f ($env.HOME)/.local/share/flf/wavy.flf (hostname)
'';
environmentVariables = {
ENV_CONVERSIONS.PATH = {
from_string = lib.hm.nushell.mkNushellInline "{|s| $s | split row (char esep) }";
to_string = lib.hm.nushell.mkNushellInline "{|v| $v | str join (char esep) }";
};
};
settings = {
show_banner = false;
};
};
}

View file

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
{
programs.nushell = {
enable = true;
shellAliases = {
"em" = "emacsclient -n -r";
"gtr" = "gtrash -r";
"rm" = "gtrash put";
};
loginFile.text = ''
${pkgs.figlet}/bin/figlet -f ($env.HOME)/.local/share/flf/wavy.flf (hostname)
'';
environmentVariables = {
ENV_CONVERSIONS.PATH = {
from_string = lib.hm.nushell.mkNushellInline "{|s| $s | split row (char esep) }";
to_string = lib.hm.nushell.mkNushellInline "{|v| $v | str join (char esep) }";
};
};
settings = {
show_banner = false;
};
};
}