diff --git a/flake.nix b/flake.nix index 71474f5..3a4e0c8 100644 --- a/flake.nix +++ b/flake.nix @@ -107,6 +107,25 @@ timeZone = "Europe/Moscow"; }; + # Colors. + nixosModules.color = { + aqua = "689d68"; + bg = "1d2021"; + bg_1 = "504945"; + blue = "458588"; + blue_faded = "076678"; + darkgray = "282828"; + fg = "ebdbb2"; + fg_1 = "fbf1c7"; + fg_2 = "d5c4a1"; + gray = "a89984"; + green = "98971a"; + purple = "b16286"; + red = "cc241d"; + transparent = "ffffff00"; + yellow = "b8bb26"; + }; + # Common modules used across all hosts. nixosModules.common.imports = [ ./module/common/AutoUpdate.nix @@ -149,6 +168,7 @@ specialArgs = { const = self.nixosModules.const; + color = self.nixosModules.color; flake = self; inputs = inputs; }; @@ -261,6 +281,7 @@ ]; extraSpecialArgs = { const = self.nixosModules.const; + color = self.nixosModules.color; flake = self; inputs = inputs; }; diff --git a/module/common/Tmux.nix b/module/common/Tmux.nix index 5e4c3a5..512888b 100644 --- a/module/common/Tmux.nix +++ b/module/common/Tmux.nix @@ -1,9 +1,13 @@ -{ pkgs, ... }: let +{ pkgs, color, ... }: let script = pkgs.writeShellScriptBin "tmux_script" (builtins.readFile ./tmux/Script.sh); in { programs.tmux = { enable = true; - extraConfig = builtins.readFile ./tmux/tmux.conf; + extraConfig = '' + set -g @COLOR_BG #${color.bg} + set -g @COLOR_DARKGRAY #${color.darkgray} + set -g @COLOR_YELLOW #${color.yellow} + '' + (builtins.readFile ./tmux/tmux.conf); }; environment.systemPackages = [ script ]; } diff --git a/module/common/tmux/tmux.conf b/module/common/tmux/tmux.conf index 6a4fbef..522b2fd 100644 --- a/module/common/tmux/tmux.conf +++ b/module/common/tmux/tmux.conf @@ -21,7 +21,7 @@ bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" # Selection style. -set -g mode-style "fg=#282828 bg=#b8bb26 bold" +set -g mode-style "fg=#{@COLOR_DARKGRAY} bg=#{@COLOR_YELLOW} bold" # Pane style. set -g pane-border-style "fg=#504945"