diff options
author | tv <tv@krebsco.de> | 2018-03-20 20:12:13 +0100 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-03-20 20:14:08 +0100 |
commit | c16e7b2ceae1d42d961f9e2aa66ec2bf32ac489b (patch) | |
tree | 3c1880ba6891a3ebd988ddc5ac5d8304339b6a99 | |
parent | 917db24b3f0f3da858d5575ca20fdaeafc007c20 (diff) |
default.nix: add debug code
-rw-r--r-- | default.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/default.nix b/default.nix index 52e8924cd..cab55d40a 100644 --- a/default.nix +++ b/default.nix @@ -3,3 +3,20 @@ import <nixpkgs/nixos/lib/eval-config.nix> { (import <nixpkgs/nixos/lib/from-env.nix> "NIXOS_CONFIG" <nixos-config>) ]; } +// +{ + lib = import ./lib; + systems = with import ./lib; let + ns = getEnv "LOGNAME"; + in + genAttrs + (attrNames (filterAttrs (_: eq "directory") (readDir (<stockholm> + "/${ns}/1systems")))) + (name: let + config = import (<stockholm> + "/${ns}/1systems/${name}/config.nix"); + source = import (<stockholm> + "/${ns}/1systems/${name}/source.nix"); + in import <nixpkgs/nixos/lib/eval-config.nix> { + modules = [ config ]; + } // { + inherit source; + }); +} |