diff options
author | tv <tv@krebsco.de> | 2018-04-03 23:20:32 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2018-04-03 23:20:32 +0200 |
commit | eb684c7618697b370cf69c175ef43e0ced361407 (patch) | |
tree | 2d81470fdf4063379270cfa32a2a3b6c4aa01008 /default.nix | |
parent | 3108c4323806eee9798a6ba42977ea8f16343731 (diff) | |
parent | 1604ecfc706d2921248d0c9ac7cef02274842272 (diff) |
Merge remote-tracking branch 'prism/master'
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; + }); +} |