diff options
author | tv <tv@shackspace.de> | 2015-10-20 02:33:58 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-10-20 03:02:27 +0200 |
commit | cb654782fa9b8130d056579a7922062a92501b77 (patch) | |
tree | 09bc1af8356c7054babec417fd0fd0c06f40ff0d /krebs/default.nix | |
parent | 5fdae43a99af8783549e8b7d1424556d1f219bf6 (diff) |
document top-level default.nix
Diffstat (limited to 'krebs/default.nix')
-rw-r--r-- | krebs/default.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/krebs/default.nix b/krebs/default.nix index 6e2aa2f9e..daa23cba8 100644 --- a/krebs/default.nix +++ b/krebs/default.nix @@ -129,11 +129,15 @@ lib = import ./4lib { lib = import <nixpkgs/lib>; } // rec { - stockholm = import ../. current; + stockholm-path = ../.; + + stockholm = import stockholm-path current; + + nspath = ns: p: stockholm-path + "/${ns}/${p}"; get-config = system: stockholm.users.${current-user-name}.${system}.config - or (abort "unknown system: ${system}"); + or (abort "unknown system: ${system}, user: ${current-user-name}"); doc = s: let b = "EOF${builtins.hashString "sha256" s}"; in @@ -160,8 +164,7 @@ inherit current-user-name; }; - config = stockholm.${current-user-name}.${system}.config - or (abort "unknown system: ${system}"); + config = get-config system; nix-path = lib.concatStringsSep ":" @@ -209,8 +212,7 @@ inherit current-user-name; }; - config = stockholm.${current-user-name}.${system}.config - or (abort "unknown system: ${system}"); + config = get-config system; current-host = config.krebs.hosts.${current-host-name}; current-user = config.krebs.users.${current-user-name}; |