zsh: spaceship -> starship

This commit is contained in:
nyanloutre 2019-09-21 21:57:55 +02:00
parent bb257b08cb
commit 67a6b2bfa7
1 changed files with 34 additions and 24 deletions

View File

@ -43,6 +43,7 @@
ncdu ncdu
youtube-dl youtube-dl
tldr tldr
starship
# Audio # Audio
beets beets
@ -55,36 +56,45 @@
openssl openssl
]; ];
programs.tmux = { users.defaultUserShell = pkgs.zsh;
programs = {
tmux = {
enable = true; enable = true;
clock24 = true; clock24 = true;
}; };
users.defaultUserShell = pkgs.zsh; zsh = {
programs.zsh = {
enable = true; enable = true;
autosuggestions.enable = true; autosuggestions.enable = true;
enableCompletion = true; enableCompletion = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
interactiveShellInit = '' interactiveShellInit = ''
source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh" source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh"
eval "$(starship init zsh)"
''; '';
ohMyZsh = { ohMyZsh = {
enable = true; enable = true;
plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ]; plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ];
customPkgs = with pkgs;[ customPkgs = with pkgs;[
spaceship-prompt
nix-zsh-completions nix-zsh-completions
]; ];
theme = "spaceship";
}; };
}; };
environment.variables = { bash.interactiveShellInit = ''
eval "$(starship init bash)"
'';
};
environment.variables = let
starshipConfToml =
pkgs.writeText "starship.toml" ''
[[battery.display]]
threshold = 50
'';
in {
EDITOR = "nvim"; EDITOR = "nvim";
SPACESHIP_TIME_SHOW = "true"; STARSHIP_CONFIG = "${starshipConfToml}";
SPACESHIP_BATTERY_THRESHOLD = "50";
SPACESHIP_EXIT_CODE_SHOW = "true";
}; };
nix.gc.automatic = true; nix.gc.automatic = true;