summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-21 00:08:18 +0200
committertv <tv@shackspace.de>2015-10-21 00:11:12 +0200
commit226ea391caec5b3f2f112de263dd2db3a0e012f4 (patch)
tree4815b67dcf4389d468a931e535164b7b34074f02 /default.nix
parentfc45cc29265e9b3e51033fddd5d8ea1042c1aa41 (diff)
stockholm: provide krebs lib
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix24
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