Skip to content
Commit e1dee4ef authored by Silvan Mosberger's avatar Silvan Mosberger Committed by John Ericson
Browse files

lib: make extensible

This allows the lib fixed point to be extended with

  myLib = lib.extend (self: super: {
    foo = "foo";
  })

With this it's possible to have the new modified lib attrset available to all
modules when using evalModules

  myLib.evalModules {
    modules = [ ({ lib, ... }: {
      options.bar = lib.mkOption {
	default = lib.foo;
      };
    }) ];
  }

  => { config = { bar = "foo"; ... }; options = ...; }
parent 95ece9ef
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment