From 9ca3430e5260697294dd04629a2e2b95214fcefb Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Thu, 22 Jul 2021 10:02:25 +1000 Subject: [PATCH] zsh: switched from powerline to starship --- profiles/bash.nix | 19 +++++++++++++++++++ profiles/host_common.nix | 2 ++ profiles/starship.nix | 7 +++++++ profiles/zsh.nix | 5 +++-- 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 profiles/bash.nix create mode 100644 profiles/starship.nix diff --git a/profiles/bash.nix b/profiles/bash.nix new file mode 100644 index 0000000..e31192b --- /dev/null +++ b/profiles/bash.nix @@ -0,0 +1,19 @@ +# Configuration common to all my servers + +{ config, ... }: + +{ + + # Program defaults for all hosts + programs.bash = { + interactiveShellInit = '' + export TERM="xterm-256color" + test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors) + ''; + promptInit = '' + eval "$(starship init bash)" + ''; + vteIntegration = true; + }; + +} diff --git a/profiles/host_common.nix b/profiles/host_common.nix index 75b8d81..1f50988 100644 --- a/profiles/host_common.nix +++ b/profiles/host_common.nix @@ -5,9 +5,11 @@ { imports = [ + ../profiles/bash.nix ./chrony.nix ../profiles/neovim.nix ../profiles/logrotate.nix + ../profiles/starship.nix ./tmux.nix ./zsh.nix ]; diff --git a/profiles/starship.nix b/profiles/starship.nix new file mode 100644 index 0000000..797ed08 --- /dev/null +++ b/profiles/starship.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + starship # A minimal, blazing fast, and extremely customizable prompt for any shell + ]; +} diff --git a/profiles/zsh.nix b/profiles/zsh.nix index b32c045..db6854e 100644 --- a/profiles/zsh.nix +++ b/profiles/zsh.nix @@ -27,9 +27,10 @@ "fzf" "git" ]; - theme = "powerlevel9k"; }; - promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme"; + promptInit = '' + eval "$(starship init zsh)" + ''; vteIntegration = true; };