summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2018-04-04 15:23:44 +0200
committermakefu <github@syntax-fehler.de>2018-04-04 15:23:44 +0200
commit3ed84b0b8c063a294e7cb40a786fa7a15ee0e5a4 (patch)
tree569658ceb8fc90f640d7ce48357eb84a0383b494 /default.nix
parent1b740bf9ef32972f7242226699a75b39feeb18b2 (diff)
parent1a5b58c828409ce9bf1639f3f26ebeb142e0148a (diff)
Merge remote-tracking branch 'lass/staging/18.03' into staging
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;
+ });
+}