Skip to content

Commit

Permalink
refactor(modules): use standalone attrset for lib
Browse files Browse the repository at this point in the history
We don't need to extend nixpkgs.lib anymore
  • Loading branch information
getchoo committed Nov 27, 2024
1 parent d870483 commit b666798
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
2 changes: 1 addition & 1 deletion modules/global.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

{
Expand Down
9 changes: 3 additions & 6 deletions modules/lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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; });
}
})
14 changes: 0 additions & 14 deletions modules/lib/mk-ext-lib.nix

This file was deleted.

0 comments on commit b666798

Please sign in to comment.