mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-20 03:34:07 +02:00
better nushell config
This commit is contained in:
parent
54e628eb7c
commit
9a7fa0bb5b
3 changed files with 56 additions and 0 deletions
|
@ -6,5 +6,6 @@
|
|||
./direnv
|
||||
./firefox
|
||||
./git
|
||||
./nushell
|
||||
];
|
||||
}
|
||||
|
|
54
home-modules/nushell/default.nix
Normal file
54
home-modules/nushell/default.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.jopejoe1.nushell;
|
||||
in {
|
||||
options.jopejoe1.nushell = {
|
||||
enable = lib.mkEnableOption "Enable Nushell";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs = {
|
||||
nushell = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
let carapace_completer = {|spans|
|
||||
carapace $spans.0 nushell $spans | from json
|
||||
}
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
completions: {
|
||||
case_sensitive: false
|
||||
quick: true
|
||||
partial: true
|
||||
algorithm: "fuzzy"
|
||||
external: {
|
||||
enable: true
|
||||
max_results: 100
|
||||
completer: $carapace_completer
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
shellAliases = {
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
};
|
||||
};
|
||||
carapace.enable = true;
|
||||
carapace.enableNushellIntegration = true;
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
character = {
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[➜](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -44,6 +44,7 @@ in {
|
|||
emoji = config.fonts.fontconfig.defaultFonts.emoji;
|
||||
};
|
||||
};
|
||||
nushell.enable = true;
|
||||
git.enable = true;
|
||||
direnv.enable = true;
|
||||
firefox.enable = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue