let's try nushell

This commit is contained in:
Christoph Cullmann 2024-07-19 17:56:28 +02:00
parent 7f2d8831c4
commit 68d99c3696
No known key found for this signature in database
3 changed files with 21 additions and 53 deletions

View file

@ -330,6 +330,7 @@ in
pkgs.kdePackages.neochat pkgs.kdePackages.neochat
nixos-install-tools nixos-install-tools
nmap nmap
nushell
nvme-cli nvme-cli
procmail procmail
okteta okteta
@ -493,12 +494,8 @@ in
enableMail = false; enableMail = false;
}; };
# use ZSH per default # add nushell and zsh to allowed shells
programs.zsh.enable = true; environment.shells = with pkgs; [ nushell zsh ];
environment.shells = with pkgs; [ zsh ];
# needed for the ZSH completion
environment.pathsToLink = [ "/share/zsh" ];
# use micro as default terminal editor # use micro as default terminal editor
environment.variables.EDITOR = "micro"; environment.variables.EDITOR = "micro";

View file

@ -2,31 +2,19 @@
# initial version # initial version
home.stateVersion = "22.11"; home.stateVersion = "22.11";
# ZSH with good config # my nushell config
programs.zsh = { programs.nushell = {
# ZSH on # we use nushell
enable = true; enable = true;
# we want completion # shell config
enableCompletion = true; extraConfig = ''
$env.config = {
# we want suggestions of already typed stuff table: {
autosuggestion.enable = true; mode: none
}
# we want nice command highlighting }
syntaxHighlighting.enable = true; '';
# better history
history = {
# save timestamps
extended = true;
# kill dupes over full history
ignoreAllDups = true;
# don't share history between sessions
share = false;
};
# aliases # aliases
shellAliases = { shellAliases = {
@ -54,14 +42,14 @@
neko = "ssh neko.fritz.box"; neko = "ssh neko.fritz.box";
nekoroot = "ssh root@neko.fritz.box"; nekoroot = "ssh root@neko.fritz.box";
}; };
}; };
# nice prompt # nice prompt
# https://starship.rs/config/ # https://starship.rs/config/
# https://draculatheme.com/starship # https://draculatheme.com/starship
programs.starship = { programs.starship = {
enable = true; enable = true;
enableZshIntegration = true; enableNushellIntegration = true;
settings = { settings = {
aws.style = "bold #ffb86c"; aws.style = "bold #ffb86c";
cmd_duration.style = "bold #f1fa8c"; cmd_duration.style = "bold #f1fa8c";
@ -87,37 +75,20 @@
# nice cd # nice cd
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableZshIntegration = true; enableNushellIntegration = true;
options = [ "--cmd" "cd" ]; options = [ "--cmd" "cd" ];
}; };
# integrate fuzzy search
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
# better completion # better completion
programs.carapace = { programs.carapace = {
enable = true; enable = true;
enableZshIntegration = true; enableNushellIntegration = true;
}; };
# better ls, adds la and Co. aliases, too # better ls, adds la and Co. aliases, too
programs.eza = { programs.eza = {
enable = true; enable = true;
enableZshIntegration = true; enableNushellIntegration = true;
};
# tmux replacement
programs.zellij = {
enable = true;
enableZshIntegration = true;
settings = {
theme = "catppuccin-mocha";
pane_frames = false;
on_force_close = "quit";
};
}; };
# better cat # better cat

View file

@ -14,8 +14,8 @@ in
# all users and passwords are defined here # all users and passwords are defined here
mutableUsers = false; mutableUsers = false;
# default shell is ZSH # default shell is nushell
defaultUserShell = pkgs.zsh; defaultUserShell = pkgs.nushell;
# #
# administrator # administrator