Add /nix/store bck to store image
This commit is contained in:
parent
b01cea0fef
commit
48966025df
|
@ -75,18 +75,21 @@ let
|
||||||
config.genode.core.romModules)))
|
config.genode.core.romModules)))
|
||||||
}] } ]'');
|
}] } ]'');
|
||||||
|
|
||||||
extraRoutes = lib.concatStringsSep ", " (lib.lists.flatten
|
extraRoutes = lib.concatStringsSep ", " (lib.lists.flatten (let
|
||||||
(lib.mapAttrsToList (name: value:
|
toRoutes = prefix:
|
||||||
|
lib.mapAttrsToList (name: value:
|
||||||
map (suffix: ''
|
map (suffix: ''
|
||||||
{ service =
|
{ service =
|
||||||
{ name = "ROM"
|
{ name = "ROM"
|
||||||
, label =
|
, label =
|
||||||
Sigil.Init.LabelSelector.Type.Partial
|
Sigil.Init.LabelSelector.Type.Partial
|
||||||
{ prefix = Some "nixos -> ${name}", suffix = Some "${suffix}" }
|
{ prefix = Some "${prefix}${name}", suffix = Some "${suffix}" }
|
||||||
}
|
}
|
||||||
, route = Sigil.Init.Route.parent (Some "${suffix}")
|
, route = Sigil.Init.Route.parent (Some "${suffix}")
|
||||||
}
|
}
|
||||||
'') value.coreROMs) config.genode.init.children));
|
'') value.coreROMs);
|
||||||
|
in (toRoutes "" config.genode.core.children)
|
||||||
|
++ (toRoutes "nixos -> " config.genode.init.children)));
|
||||||
|
|
||||||
extraCoreChildren = "[ ${
|
extraCoreChildren = "[ ${
|
||||||
lib.concatStringsSep ", " (lib.mapAttrsToList
|
lib.concatStringsSep ", " (lib.mapAttrsToList
|
||||||
|
@ -293,24 +296,25 @@ in {
|
||||||
image = pkgs.callPackage "${modulesPath}/../lib/make-iso9660-image.nix" {
|
image = pkgs.callPackage "${modulesPath}/../lib/make-iso9660-image.nix" {
|
||||||
contents = erisContents;
|
contents = erisContents;
|
||||||
compressImage = true;
|
compressImage = true;
|
||||||
|
storeContents = lib.attrsets.mapAttrsToList (name: child: {
|
||||||
|
object = child.configFile;
|
||||||
|
symlink = "/config/${name}";
|
||||||
|
}) config.genode.init.children;
|
||||||
volumeID = "sigil-store";
|
volumeID = "sigil-store";
|
||||||
} + "/iso/cd.iso.zst";
|
} + "/iso/cd.iso.zst";
|
||||||
guid = lib.uuidFrom (toString image);
|
guid = lib.uuidFrom (toString image);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.diskImage =
|
virtualisation.diskImage = if config.genode.core.storeBackend == "fs" then
|
||||||
import ./lib/make-bootable-image.nix { inherit config lib pkgs; };
|
import ./lib/make-bootable-image.nix { inherit config lib pkgs; }
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
|
||||||
virtualisation.useBootLoader = config.genode.core.storeBackend == "fs";
|
virtualisation.useBootLoader = config.genode.core.storeBackend == "fs";
|
||||||
|
|
||||||
virtualisation.qemu.options = let
|
virtualisation.qemu.options = {
|
||||||
blockCommon =
|
fs = [ "-bios ${pkgs.buildPackages.buildPackages.OVMF.fd}/FV/OVMF.fd" ];
|
||||||
[ "-bios ${pkgs.buildPackages.buildPackages.OVMF.fd}/FV/OVMF.fd" ];
|
}.${config.genode.core.storeBackend} or [ ];
|
||||||
in {
|
|
||||||
fs = blockCommon;
|
|
||||||
net = [ ];
|
|
||||||
memory = [ ];
|
|
||||||
}.${config.genode.core.storeBackend};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue