Files
nixos-blueprint/modules/home/programs/shell/nushell.nix
2025-03-05 16:20:17 +02:00

75 lines
1.6 KiB
Nix

{
# pkgs,
config,
lib,
...
}:
with lib; let
cfg = config.shell.nushell;
in {
options = {
shell.nushell.enable =
mkEnableOption "enable nushell";
};
config = mkIf cfg.enable {
programs = {
atuin = {
enable = false;
enableNushellIntegration = true;
flags = [
"--disable-up-arrow"
];
};
carapace.enable = true;
zoxide.enable = true;
oh-my-posh.enableNushellIntegration = true;
nushell = {
enable = true;
environmentVariables = {
CARAPACE_BRIDGES = "fish";
CARAPACE_MATCH = 1;
EDITOR = "hx";
};
shellAliases = {
cd = "z";
la = "ls -a";
l = "ls -la";
nix-shell = "nix-shell --command nu";
};
extraConfig = ''
$env.config = {
show_banner: false
shell_integration: {
osc2: true
osc7: true
osc8: true
osc9_9: false
osc133: true
osc633: true
reset_application_mode: true
}
ls: {
use_ls_colors: true
clickable_links: true
}
rm: {
always_trash: true
}
edit_mode: 'vi'
completions: {
case_sensitive: false
quick: true
partial: true
algorithm: "fuzzy"
external: {
enable: true
#max_results: 100
}
}
}
'';
};
};
};
}