flake

Francesco Saccone's Nix flake.
git clone git://git.francescosaccone.com/flake
Log | Files | Refs | README | LICENSE

commit af5431b9696c96b377b1208dd896aaf2ee9040a9
parent 9fbf94cdfba5691946d12908b524a5defe98a0fc
Author: Francesco Saccone <francesco@francescosaccone.com>
Date:   Mon, 14 Apr 2025 16:45:54 +0200

feat: define the 'colors' option (with read-only 'transparent')

Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>

Diffstat:
Mmodules/home-manager/sway/colors.nix | 1-
Mmodules/home-manager/sway/default.nix | 37+++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/modules/home-manager/sway/colors.nix b/modules/home-manager/sway/colors.nix @@ -4,7 +4,6 @@ background = "#00112b"; foreground = "#d5e5ff"; - transparent = "#00000000"; darkRed = "#c85151"; green = "#80ff80"; diff --git a/modules/home-manager/sway/default.nix b/modules/home-manager/sway/default.nix @@ -24,6 +24,43 @@ ''; }; }; + colors = lib.mkOption { + description = "The hex colors, in '#rrggbb[aa]' format."; + default = import ./colors.nix; + type = lib.types.submodule { + options = { + background = lib.mkOption { + description = '' + The background color: it should be continous with the background + image. + ''; + type = lib.types.uniq lib.types.str; + }; + foreground = lib.mkOption { + description = "The foreground color."; + type = lib.types.uniq lib.types.str; + }; + darkRed = lib.mkOption { + description = "The dark red color."; + type = lib.types.uniq lib.types.str; + }; + green = lib.mkOption { + description = "The green color."; + type = lib.types.uniq lib.types.str; + }; + red = lib.mkOption { + description = "The red color."; + type = lib.types.uniq lib.types.str; + }; + transparent = lib.mkOption { + description = "The transparent color."; + readOnly = true; + default = "#00000000"; + type = lib.types.uniq lib.types.str; + }; + }; + }; + }; }; config = lib.mkIf config.modules.sway.enable {