diff options
author | makefu <github@syntax-fehler.de> | 2018-04-04 15:23:44 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-04-04 15:23:44 +0200 |
commit | 3ed84b0b8c063a294e7cb40a786fa7a15ee0e5a4 (patch) | |
tree | 569658ceb8fc90f640d7ce48357eb84a0383b494 /default.nix | |
parent | 1b740bf9ef32972f7242226699a75b39feeb18b2 (diff) | |
parent | 1a5b58c828409ce9bf1639f3f26ebeb142e0148a (diff) |
Merge remote-tracking branch 'lass/staging/18.03' into staging
Diffstat (limited to 'default.nix')
-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; + }); +} |