Skip to content

Commit

Permalink
📝 devos: clarify how to use /lib/
Browse files Browse the repository at this point in the history
  • Loading branch information
ProducerMatt committed Jan 25, 2023
1 parent bca4b89 commit 4ef9b27
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion examples/devos/lib/default.nix
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
{lib}:
lib.makeExtensible (self: {})
lib.makeExtensible (self:
let
callLibs = file: import file { lib = self; };
in
rec {
## Define your own library functions here!
#id = x: x;
## Or in files, containing functions that take {lib}
#foo = callLibs ./foo.nix;
## In configs, they can be used under "lib.our"
})

0 comments on commit 4ef9b27

Please sign in to comment.