diff --git a/modules/global.nix b/modules/global.nix index dc5aaf3c..312844e9 100644 --- a/modules/global.nix +++ b/modules/global.nix @@ -7,7 +7,7 @@ }: let - catppuccinLib = (import ./lib/mk-ext-lib.nix { inherit config lib pkgs; }).ctp; + catppuccinLib = import ./lib { inherit config lib pkgs; }; in { diff --git a/modules/lib/default.nix b/modules/lib/default.nix index 69e89d86..be6e70bf 100644 --- a/modules/lib/default.nix +++ b/modules/lib/default.nix @@ -4,11 +4,8 @@ pkgs, ... }: -let - # this is a recursive attribute with all the functions below - inherit (lib) ctp; -in -{ + +lib.makeExtensible (ctp: { types = { flavor = lib.types.enum [ "latte" @@ -153,4 +150,4 @@ in # [ module ] -> [ module ] # Imports a list of modules with the current library applyToModules = map (lib.flip lib.modules.importApply { catppuccinLib = ctp; }); -} +}) diff --git a/modules/lib/mk-ext-lib.nix b/modules/lib/mk-ext-lib.nix deleted file mode 100644 index 55f39e86..00000000 --- a/modules/lib/mk-ext-lib.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -lib.extend ( - final: _: { - ctp = import ./. { - inherit config pkgs; - lib = final; - }; - } -)