about summary refs log tree commit diff
path: root/modules/user/aszlig/programs/zsh/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/aszlig/programs/zsh/default.nix')
-rw-r--r--modules/user/aszlig/programs/zsh/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/user/aszlig/programs/zsh/default.nix b/modules/user/aszlig/programs/zsh/default.nix
index 119b6aa9..71b1ca09 100644
--- a/modules/user/aszlig/programs/zsh/default.nix
+++ b/modules/user/aszlig/programs/zsh/default.nix
@@ -4,10 +4,22 @@ with lib;
 
 let
   cfg = config.vuizvui.user.aszlig.programs.zsh;
+  inherit (cfg) machineColor;
 
 in {
   options.vuizvui.user.aszlig.programs.zsh = {
     enable = mkEnableOption "zsh";
+
+    machineColor = mkOption {
+      type = types.enum [
+        "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"
+      ];
+      default = "red";
+      example = "green";
+      description = ''
+        The color used for coloring the machine name in the prompt.
+      '';
+    };
   };
 
   config = mkIf cfg.enable {
@@ -107,7 +119,7 @@ in {
       autoload -Uz prompt_special_chars
 
       () {
-          local p_machine='%(!..%B%F{red}%n%b%F{blue}@)%b%F{red}%m'
+          local p_machine='%(!..%B%F{red}%n%b%F{blue}@)%b%F{${machineColor}}%m'
           local p_path='%B%F{blue}[%F{cyan}%~%B%F{blue}]'
           local p_exitcode='%F{green}%?%(!.%F{cyan}>.%b%F{green}>)%b%f '
           PROMPT="$p_machine$p_path$p_exitcode"