about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-05-03 02:32:27 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-05-03 02:49:49 +0200
commit1ac04e64a280ce656a7837e062d49423c138aa05 (patch)
tree0b6faa42944fd35f2480afd3cb33e5009e65c35a
parent58b0058419e9caebfdb9628b8ac89413c22b6973 (diff)
lib/call-machine: Fix passing extraConfig in mkIso
Commit 31809189d5126979e51b4fb4cf0fa7a35a401e53 introduced this.

Unfortunately using extraConfig as a fallback isn't really how this was
intended to work, so let's make sure we _always_ supply the extraConfig
to the module.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--lib/call-machine.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/call-machine.nix b/lib/call-machine.nix
index 16abb9d2..d5b8239a 100644
--- a/lib/call-machine.nix
+++ b/lib/call-machine.nix
@@ -33,13 +33,13 @@ let
 
   mkIso = isoModule: extraConfig: let
     wrapIso = { config, pkgs, lib, ... }@attrs: let
-      isoEval = (import isoModule attrs);
+      isoEval = import isoModule attrs;
       isoEvalcfg = isoEval.config or {};
       bootcfg = isoEvalcfg.boot or {};
       fscfg = isoEvalcfg.fileSystems or {};
     in {
       options = isoEval.options or {};
-      imports = isoEval.imports or [ extraConfig ];
+      imports = (isoEval.imports or []) ++ [ extraConfig ];
       config = isoEvalcfg // {
         boot = bootcfg // lib.optionalAttrs (bootcfg ? loader) {
           loader = lib.mkForce bootcfg.loader;