diff options
author | tv <tv@shackspace.de> | 2015-10-21 00:08:18 +0200 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-10-21 01:53:07 +0200 |
commit | 3ce57c3de3f3dc95669d3a0564f6f7d0ff425321 (patch) | |
tree | 58eab48c4a0c8150f3f6ad66f0e952b18d73a627 /default.nix | |
parent | 8f7253184ac53792d125c6713b0757da58389b1e (diff) |
stockholm: provide krebs lib
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/default.nix b/default.nix index 11bae7d98..c70225174 100644 --- a/default.nix +++ b/default.nix @@ -47,8 +47,20 @@ let stockholm = { inherit (eval {}) pkgs; }; - krebs = import ./krebs (current // { inherit stockholm; }); - inherit (krebs) lib; + krebs = import ./krebs (current // { inherit lib stockholm; }); + + lib = + let + lib = import <nixpkgs/lib>; + klib = import ./krebs/4lib { inherit lib; }; + #ulib = import (./. + "/${current-user-name}/4lib") { lib = lib // klib; }; + ulib = {}; # TODO + in + builtins // lib // klib // ulib // rec { + # TODO move this stuff + stockholm-path = ./.; + nspath = ns: p: stockholm-path + "/${ns}/${p}"; + }; # Path resolvers for common and individual files. # Example: `upath "3modules"` produces the current user's 3modules directory @@ -65,8 +77,8 @@ let stockholm = { let # Notice the ordering. Krebs packages can only depend on Nixpkgs, # whereas user packages additionally can depend on krebs packages. - kpkgs = import (kpath "5pkgs") { inherit pkgs; }; - upkgs = import (upath "5pkgs") { pkgs = pkgs // kpkgs; }; + kpkgs = import (kpath "5pkgs") { inherit lib pkgs; }; + upkgs = import (upath "5pkgs") { inherit lib; pkgs = pkgs // kpkgs; }; in kpkgs // upkgs; }; @@ -76,8 +88,10 @@ let stockholm = { # packages and modules on top of NixOS. Some of this stuff might become # useful to a broader audience, at which point it should probably be merged # and pull-requested for inclusion into NixOS/nixpkgs. - # TODO provide krebs lib, so modules don't have to import it awkwardly eval = config: import <nixpkgs/nixos/lib/eval-config.nix> { + specialArgs = { + inherit lib; + }; modules = [ base-module config |