diff options
author | makefu <github@syntax-fehler.de> | 2018-12-05 16:41:38 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2018-12-05 16:41:38 +0100 |
commit | a4556a17f6639efe13e709bf53af15bb2a70c82d (patch) | |
tree | c81f829077d32fce39baaf7bfa526d8cac071879 /default.nix | |
parent | 1859d6653a12e1bfda9465780610f63da8f5ce69 (diff) | |
parent | e4750d38e76db94a0b255fa143408b8cbe38b61b (diff) |
Merge remote-tracking branch 'lass/master' into HEAD
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/default.nix b/default.nix index 5ae8e399e..9368dcd9e 100644 --- a/default.nix +++ b/default.nix @@ -1,19 +1,12 @@ -import <nixpkgs/nixos/lib/eval-config.nix> { - modules = [ - (import <nixpkgs/nixos/lib/from-env.nix> "NIXOS_CONFIG" <nixos-config>) - ]; -} -// -{ +import <nixpkgs/nixos> {} // rec { lib = import ./lib; - systems = with import ./lib; let - ns = getEnv "LOGNAME"; + systems = with lib; let + namespace = getEnv "LOGNAME"; + systemsDir = <stockholm> + "/${namespace}/1systems"; in genAttrs - (attrNames (filterAttrs (_: eq "directory") (readDir (<stockholm> + "/${ns}/1systems")))) - (name: let - config = import (<stockholm> + "/${ns}/1systems/${name}/config.nix"); - in import <nixpkgs/nixos/lib/eval-config.nix> { - modules = [ config ]; + (attrNames (filterAttrs (_: eq "directory") (readDir systemsDir))) + (name: import <nixpkgs/nixos> { + configuration = import (systemsDir + "/${name}/config.nix"); }); } |