Skip to content

Commit

Permalink
feat: add enable option globally
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Apr 21, 2024
1 parent 29bd8a3 commit de389d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions modules/home-manager/globals.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{ lib, ... }: {
options.catppuccin = {
enable = lib.mkEnableOption "Catppuccin globally";

flavour = lib.mkOption {
type = lib.ctp.types.flavourOption;
default = "latte";
Expand Down
4 changes: 3 additions & 1 deletion modules/lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
2 changes: 2 additions & 0 deletions modules/nixos/globals.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{ lib, ... }: {
options.catppuccin = {
enable = lib.mkEnableOption "Catppuccin globally";

flavour = lib.mkOption {
type = lib.ctp.types.flavourOption;
default = "latte";
Expand Down

0 comments on commit de389d1

Please sign in to comment.