From de389d1a926bf97fd790e529d97445beabfd57ac Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 18 Apr 2024 22:34:04 +0200 Subject: [PATCH] feat: add `enable` option globally --- modules/home-manager/globals.nix | 2 ++ modules/lib/default.nix | 4 +++- modules/nixos/globals.nix | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/globals.nix b/modules/home-manager/globals.nix index 259cd99f..f39367ae 100644 --- a/modules/home-manager/globals.nix +++ b/modules/home-manager/globals.nix @@ -1,5 +1,7 @@ { lib, ... }: { options.catppuccin = { + enable = lib.mkEnableOption "Catppuccin globally"; + flavour = lib.mkOption { type = lib.ctp.types.flavourOption; default = "latte"; diff --git a/modules/lib/default.nix b/modules/lib/default.nix index 57359293..9a3beb31 100644 --- a/modules/lib/default.nix +++ b/modules/lib/default.nix @@ -105,7 +105,9 @@ in # be the name of the module, followed by the local config # attrset mkCatppuccinOpt = name: { - enable = lib.mkEnableOption "Catppuccin theme"; + enable = lib.mkEnableOption "Catppuccin theme" // { + default = config.catppuccin.enable; + }; flavour = mkFlavourOpt name; }; diff --git a/modules/nixos/globals.nix b/modules/nixos/globals.nix index 63ea819f..5f0ddc9e 100644 --- a/modules/nixos/globals.nix +++ b/modules/nixos/globals.nix @@ -1,5 +1,7 @@ { lib, ... }: { options.catppuccin = { + enable = lib.mkEnableOption "Catppuccin globally"; + flavour = lib.mkOption { type = lib.ctp.types.flavourOption; default = "latte";