diff options
author | jeschli <jeschli@gmail.com> | 2018-12-04 19:27:27 +0100 |
---|---|---|
committer | jeschli <jeschli@gmail.com> | 2018-12-04 19:27:27 +0100 |
commit | 5030b74cc5c578bb82619a24592504a6008f1a10 (patch) | |
tree | 0551e3ddb94353b7438bec02174bf3379bc89b87 /default.nix | |
parent | 78b289201987675844aa37abeb4279eb4051ebe0 (diff) | |
parent | 82988de84c177c247ebbe80940c4d50b9f073b4e (diff) |
Merge branch 'master' of prism.r:stockholm
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"); }); } |