From 67a6b2bfa7acd95bcb9a23475f3d217ca9497d5a Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sat, 21 Sep 2019 21:57:55 +0200 Subject: [PATCH] zsh: spaceship -> starship --- systems/common.nix | 58 +++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/systems/common.nix b/systems/common.nix index b3e181b66..073caa619 100644 --- a/systems/common.nix +++ b/systems/common.nix @@ -43,6 +43,7 @@ ncdu youtube-dl tldr + starship # Audio beets @@ -55,36 +56,45 @@ openssl ]; - programs.tmux = { - enable = true; - clock24 = true; - }; - users.defaultUserShell = pkgs.zsh; - programs.zsh = { - enable = true; - autosuggestions.enable = true; - enableCompletion = true; - syntaxHighlighting.enable = true; - interactiveShellInit = '' - source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh" - ''; - ohMyZsh = { + programs = { + tmux = { enable = true; - plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ]; - customPkgs = with pkgs;[ - spaceship-prompt - nix-zsh-completions - ]; - theme = "spaceship"; + clock24 = true; }; + + 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"; - SPACESHIP_TIME_SHOW = "true"; - SPACESHIP_BATTERY_THRESHOLD = "50"; - SPACESHIP_EXIT_CODE_SHOW = "true"; + STARSHIP_CONFIG = "${starshipConfToml}"; }; nix.gc.automatic = true;