add newshell and make default

This commit is contained in:
Ivan Dimitrov 2024-01-29 07:48:15 +00:00
parent 1519b02172
commit 7c32ae8364
4 changed files with 50 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ system, pkgs, home-manager, modules, nid, ... }: { system, pkgs, home-manager, modules, nid, ... }:
let let
ivand-programs = with modules.home.programs; [ nvim zsh tmux git chromium firefox kitty lf obs-studio sway swaylock browserpass bottom gpg comma ]; ivand-programs = with modules.home.programs; [ nvim zsh tmux git chromium firefox kitty lf obs-studio sway swaylock browserpass bottom gpg comma nushell ];
ivand-packages = with modules.home.packages; [ dev essential media ]; ivand-packages = with modules.home.packages; [ dev essential media ];
in in
{ {

View File

@ -12,6 +12,7 @@
gpg = import ./gpg { inherit pkgs; }; gpg = import ./gpg { inherit pkgs; };
kitty = import ./kitty { inherit pkgs; }; kitty = import ./kitty { inherit pkgs; };
lf = import ./lf; lf = import ./lf;
nushell = import ./nushell;
obs-studio = import ./obs-studio { inherit pkgs; }; obs-studio = import ./obs-studio { inherit pkgs; };
sway = import ./sway { inherit pkgs; }; sway = import ./sway { inherit pkgs; };
swaylock = import ./swaylock; swaylock = import ./swaylock;

View File

@ -0,0 +1,47 @@
{
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
)
'';
};
carapace = {
enable = true;
enableNushellIntegration = true;
};
starship = {
enable = true;
settings = {
add_newline = true;
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
};
};
};
}

View File

@ -109,6 +109,7 @@
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.zsh;
users = { users = {
ivand = { ivand = {
shell = pkgs.nushell;
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [
"adbusers" "adbusers"