From c16e7b2ceae1d42d961f9e2aa66ec2bf32ac489b Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 20 Mar 2018 20:12:13 +0100 Subject: default.nix: add debug code --- default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 52e8924c..cab55d40 100644 --- a/default.nix +++ b/default.nix @@ -3,3 +3,20 @@ import { (import "NIXOS_CONFIG" ) ]; } +// +{ + lib = import ./lib; + systems = with import ./lib; let + ns = getEnv "LOGNAME"; + in + genAttrs + (attrNames (filterAttrs (_: eq "directory") (readDir ( + "/${ns}/1systems")))) + (name: let + config = import ( + "/${ns}/1systems/${name}/config.nix"); + source = import ( + "/${ns}/1systems/${name}/source.nix"); + in import { + modules = [ config ]; + } // { + inherit source; + }); +} -- cgit v1.2.3