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 = {
enable = true;
clock24 = true;
};
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
programs.zsh = { programs = {
enable = true; tmux = {
autosuggestions.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
interactiveShellInit = ''
source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh"
'';
ohMyZsh = {
enable = true; enable = true;
plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ]; clock24 = true;
customPkgs = with pkgs;[
spaceship-prompt
nix-zsh-completions
];
theme = "spaceship";
}; };
zsh = {
enable = true;
autosuggestions.enable = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
interactiveShellInit = ''
source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh"
eval "$(starship init zsh)"
'';
ohMyZsh = {
enable = true;
plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ];
customPkgs = with pkgs;[
nix-zsh-completions
];
};
};
bash.interactiveShellInit = ''
eval "$(starship init bash)"
'';
}; };
environment.variables = { 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;