Skip to content

Commit

Permalink
chore(nushell): misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Nov 2, 2024
1 parent bc3c6f3 commit 2041a1b
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions home/isabel/packages/cli/shell/nushell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
...
}:
let
inherit (lib.meta) getExe;
inherit (lib.attrsets) mapAttrs;
inherit (lib.strings) escapeShellArg concatMapStrings;
in
{
home.packages = [ pkgs.nix-your-shell ];

programs.nushell = {
enable = false;

shellAliases = builtins.removeAttrs config.home.shellAliases [ "mkdir" ];

environmentVariables = {
DIRENV_LOG_FORMAT = "''";
SHELL = "'${getExe pkgs.nushell}'";
DIRENV_LOG_FORMAT = "";
# PATH = "($env.PATH | split row (char esep) | append [${escapeShellArgs config.home.sessionPath}])";
} // mapAttrs (_: v: (escapeShellArg v)) config.home.sessionVariables;

Expand All @@ -31,22 +31,28 @@ in

theme = "catppuccin-${config.catppuccin.flavor}";
in
completions [
"nix"
"git"
"curl"
"bat"
"cargo"
"gh"
"glow"
"just"
"rg"
"npm"
"pnpm"
"tar"
]
# nu
''
${completions [
"nix"
"git"
"curl"
"bat"
"cargo"
"gh"
"glow"
"just"
"rg"
]}
+ ''
use ${pkgs.nu_scripts}/share/nu_scripts/themes/nu-themes/${theme}.nu
# occasionally generate this with
# nix-your-shell nu | save $env.XDG_CONFIG_HOME/nushell/nix-your-shell.nu
source nix-your-shell.nu
$env.config = {
show_banner: false,
rm: {
Expand All @@ -55,12 +61,14 @@ in
ls: {
clickable_links: true
}
color_config = (${theme})
color_config: (${theme})
error_style: "fancy"
completions: {
case_sensitive: false
quick: true
partial: true
algorithm: "fuzzy"
use_ls_colors: true
}
}
'';
Expand Down

0 comments on commit 2041a1b

Please sign in to comment.