diff options
author | lassulus <lassulus@lassul.us> | 2018-03-24 12:45:35 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-03-24 12:45:35 +0100 |
commit | db37440bbb468e6ebdafc2de1d07872f0f726501 (patch) | |
tree | 0f049cbfe9be4cbc7c03c472da273c4c79eb3cd6 /default.nix | |
parent | d810727b985bbdce57ae2de515111949c141c3bd (diff) | |
parent | 4851f6b43ff2eebecf5f1dc6a808225ee1af0f08 (diff) |
Merge branch 'master' into staging/18.03
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 52e8924c..cab55d40 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; + }); +} |