diff options
author | lassulus <lassulus@lassul.us> | 2018-11-30 20:42:01 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2018-11-30 20:42:01 +0100 |
commit | f6b5bbc305c8e59d532d95e1c5b011b96fe1ed43 (patch) | |
tree | 4737d2417707eaaba3882ba5e873c1178af05ed2 /default.nix | |
parent | 7f5431a4999fea9626df300f707aa8c62de894e3 (diff) | |
parent | 574356c63e8b11abd4fb7224cff9dca1c86332a2 (diff) |
Merge remote-tracking branch 'ni/master'
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"); }); } |