feat: add nushell

mandlm 2023-12-11 20:04:42 +01:00
parent 36d1bb4252
commit 19620b549b
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
5 changed files with 42 additions and 1 deletions

View File

@ -5,6 +5,7 @@
direnv = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = true;
nix-direnv.enable = true;
};
};

View File

@ -86,6 +86,7 @@ local servers = {
},
},
["marksman"] = {},
["nushell"] = {},
["pylsp"] = {
pylsp = {
plugins = {

38
home-manager/nushell.nix Normal file
View File

@ -0,0 +1,38 @@
{ config, lib, pkgs, user, theme, ... }:
{
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 # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy" # prefix or fuzzy
external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100
completer: $carapace_completer # check 'carapace_completer'
}
}
}
$env.PATH = ($env.PATH |
split row (char esep) |
prepend /home/myuser/.apps |
append /usr/bin/env
)
'';
shellAliases = {
vi = "hx";
vim = "hx";
nano = "hx";
};
};
}

View File

@ -49,6 +49,7 @@
./home-manager/gpg
./home-manager/carapace.nix
./home-manager/zsh.nix
./home-manager/nushell.nix
./home-manager/starship.nix
./home-manager/sway
./home-manager/direnv.nix

View File

@ -8,7 +8,7 @@
isNormalUser = true;
uid = 1000;
home = "/home/mandlm";
shell = pkgs.zsh;
shell = pkgs.nushell;
extraGroups = [ "wheel" "networkmanager" "audio" "video" "input" "docker" "scanner" "lp" ];
hashedPassword = "$6$wV6dzYlgke5tN01q$rCMP/Hquss/1BgKarnZUkmejpBtjEcwmlUhbhAAmjc2Pwdbztp3yr/bD/LJ63XoZ0oD7yhTMqbECDdMqNKKDe/";
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI6NmrDRvDtUkeJM8cE7DvZKtiNBKUQ+30MhOX4BwWPzN2b+kM+TjZ5Dtiln+Zbk/QToCDFir+CIKHshpgtCPAvVkjmldeqqflKKUkShTjWfF2zRwEql58DGaTuJqPgMhS9ZVDI5OL6VoecSxWOLSKCqGu4R+yJJnTRBSaoHNzBsq81psYk/yty+QofbWsJktjJc2r3JSuM8UUVkCVqcYS9wd/3vW3NbkqOL7KJhktsJa6sBZfTs1Yr1lpKqJou24CE1TGwTxiZ7SASjiRzbtK7J9jJBCjZ80hgEp/Cop0caaVw7aedo6xRC26X2TSm7ljAdvcPew9m6ayxuLaV9Nz mandlm@apache" ];