From 36e47947bdccf7ff085e885649b9e353daf0e56c Mon Sep 17 00:00:00 2001 From: genofire Date: Fri, 13 Jan 2023 21:55:37 +0100 Subject: [PATCH] fix(prompt): switch from pure-prompt to starship --- home/default.nix | 27 +++++++++++++++++++++++---- nixos/default.nix | 35 +++++++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 10 deletions(-) diff --git a/home/default.nix b/home/default.nix index 7a0d1d4..4c23116 100644 --- a/home/default.nix +++ b/home/default.nix @@ -80,10 +80,29 @@ enableAutosuggestions = true; enableSyntaxHighlighting = true; - initExtra = '' - source ${pkgs.grml-zsh-config}/etc/zsh/zshrc - prompt pure - ''; + # initExtra = '' + # source ${pkgs.grml-zsh-config}/etc/zsh/zshrc + # prompt pure + # ''; + }; + programs.starship = { + enable = true; + # enableNushellIntegration = true; + settings = { + directory ={ + truncation_length = 0; + }; + helm = { + disabled = true; + }; + kubernetes = { + disabled = false; + format = "[$symbol$cluster( \($namespace\))]($style) in "; + detect_extensions = [ + "package" # helm + ]; + }; + }; }; programs.direnv.enable = true; programs.gitui.enable = true; diff --git a/nixos/default.nix b/nixos/default.nix index 12fbfb9..a08c958 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -56,8 +56,8 @@ unzip unrar home-manager - # nice prompt together with grml - pure-prompt + ## nice prompt together with grml + # pure-prompt ]; environment.shellAliases = { ip = "ip --color"; @@ -84,12 +84,35 @@ autosuggestions.enable = true; syntaxHighlighting.enable = true; # interactiveShellInit = '' - promptInit = '' - source ${pkgs.grml-zsh-config}/etc/zsh/zshrc - prompt pure; - ''; + # promptInit = '' + # source ${pkgs.grml-zsh-config}/etc/zsh/zshrc + # prompt pure; + # ''; # promptInit = ""; }; + programs.starship = { + enable = true; + settings = { + directory ={ + truncation_length = 0; + }; + helm = { + disabled = true; + }; + kubernetes = { + disabled = false; + format = "[$symbol$cluster( \($namespace\))]($style) in "; + detect_extensions = [ + "package" # helm + ]; + detect_folders = [ + "flux-system" + "helm" + "templates" + ]; + }; + }; + }; # tmux imports = [ ./files/tmux.nix ];