diff options
author | aszlig <aszlig@redmoonstudios.org> | 2015-03-17 00:50:41 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2015-03-17 00:50:41 +0100 |
commit | 68f357751b9f2f405a7e43ac711f7839daf3b3f4 (patch) | |
tree | df71c189acce18d710c7a2c5f31ab78fa454d3cb /default.nix | |
parent | ff6588b7aa650c8cb6d9611d52c02c11cc1fbebb (diff) |
Add a default.nix for referencing machines.
At the moment this is also the release Nix expression we're going to use for Hydra. Right now, the machine expressions don't evaluate because they're lacking hardware information. But apart from that we should get out full system builds afterwards. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..9504284b --- /dev/null +++ b/default.nix @@ -0,0 +1,17 @@ +with import <nixpkgs/lib>; + +let + genFromNixFiles = path: let + isNixFile = name: type: hasSuffix ".nix" name && type == "regular"; + importNixFile = name: const { + name = removeSuffix ".nix" name; + value = import (builtins.toPath "${path}/${name}"); + }; + in mapAttrs' importNixFile (filterAttrs isNixFile (builtins.readDir path)); + +in { + machines = mapAttrs (_: cfg: (import <nixpkgs/nixos/lib/eval-config.nix> { + system = "x86_64-linux"; + modules = [ cfg ]; + }).config.system.build.toplevel) (genFromNixFiles ./machines); +} |