diff --git a/home-manager/direnv.nix b/home-manager/direnv.nix index 1061719..1dd2ed5 100644 --- a/home-manager/direnv.nix +++ b/home-manager/direnv.nix @@ -5,6 +5,7 @@ direnv = { enable = true; enableZshIntegration = true; + enableNushellIntegration = true; nix-direnv.enable = true; }; }; diff --git a/home-manager/neovim/lspconfig.lua b/home-manager/neovim/lspconfig.lua index 92123c2..20b41c5 100644 --- a/home-manager/neovim/lspconfig.lua +++ b/home-manager/neovim/lspconfig.lua @@ -86,6 +86,7 @@ local servers = { }, }, ["marksman"] = {}, + ["nushell"] = {}, ["pylsp"] = { pylsp = { plugins = { diff --git a/home-manager/nushell.nix b/home-manager/nushell.nix new file mode 100644 index 0000000..88abfc1 --- /dev/null +++ b/home-manager/nushell.nix @@ -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 + ) + ''; + }; +} + diff --git a/home-mandlm.nix b/home-mandlm.nix index 4505896..740b487 100644 --- a/home-mandlm.nix +++ b/home-mandlm.nix @@ -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 diff --git a/users.nix b/users.nix index 7843422..668190c 100644 --- a/users.nix +++ b/users.nix @@ -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" ];