summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authornin <nin@c-base.org>2018-05-02 15:13:40 +0200
committernin <nin@c-base.org>2018-05-02 15:13:40 +0200
commit689fb1a77ad53722086da922de2de533460205b3 (patch)
tree408667e6aa15e1e0fa031e99c003c3968ba1578d /default.nix
parent702136442c5f8c4f7f1bb911bd21d238a164218a (diff)
parent37fa7bff9339799984554b8ccbacf1f07281d6ce (diff)
Merge branch 'master' of prism:stockholm
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix17
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;
+ });
+}