2018-06-10 04:00:12 +03:00
|
|
|
# This entry points allows calling `nix-build -A` with
|
|
|
|
# anything defined in the overlay (or the host system).
|
2018-06-17 02:21:41 +03:00
|
|
|
{
|
|
|
|
device
|
|
|
|
}:
|
2018-06-27 03:39:26 +03:00
|
|
|
with import <nixpkgs> {};
|
2018-06-17 02:21:41 +03:00
|
|
|
let
|
2018-06-27 03:39:26 +03:00
|
|
|
# Evaluation doesn't actually use the overlay.
|
|
|
|
# The overlay has been re-defined in the modules system.
|
2018-06-17 02:21:41 +03:00
|
|
|
eval = import ./lib/eval-config.nix {
|
|
|
|
modules = [
|
|
|
|
(import (./. + "/devices/${device}" ))
|
2018-06-19 05:23:02 +03:00
|
|
|
]
|
|
|
|
# TODO : allow loading from elsewhere through ENV
|
2018-06-27 03:39:26 +03:00
|
|
|
++ lib.optional (builtins.pathExists ./local.nix) (import (./local.nix ))
|
2018-06-19 05:23:02 +03:00
|
|
|
;
|
2018-06-17 02:21:41 +03:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit (eval.config.system.build) all;
|
2018-06-24 00:11:07 +03:00
|
|
|
|
|
|
|
# Shortcut to allow building `nixos` from the same channel revision.
|
|
|
|
# This is used by `./nixos/default.nix`
|
|
|
|
# Any time `nix-build nixos` is used upstream, it can be used here.
|
2018-06-27 03:39:26 +03:00
|
|
|
nixos = (import (path + "/nixos"));
|
2018-06-17 02:21:41 +03:00
|
|
|
}
|