feat: add nushell

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

View File

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

View File

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

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

@ -0,0 +1,36 @@
{ 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,
edit_mode: vi
shell_integration: true
use_kitty_protocol: true
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
)
'';
};
}

View File

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

View File

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