From 56e66ea842cf029b17baa1f1b498548eddae7863 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 12 Apr 2021 10:15:43 +0200 Subject: [PATCH] nixos: move /eris/* in store image to / All the ERIS URNs are prefixed already. --- nixos-modules/eris/rom-vfs.dhall | 7 ++++++- nixos-modules/genode-core.nix | 11 +++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/nixos-modules/eris/rom-vfs.dhall b/nixos-modules/eris/rom-vfs.dhall index 926799d..9b0c0c2 100644 --- a/nixos-modules/eris/rom-vfs.dhall +++ b/nixos-modules/eris/rom-vfs.dhall @@ -18,7 +18,12 @@ in λ(gptGuid : Text) → [ Init.Config.Policy::{ , service = "File_system" , label = Init.LabelSelector.prefix "eris_rom" - , attributes = toMap { root = "/eris" } + , attributes = toMap { root = "/" } + } + , Init.Config.Policy::{ + , service = "File_system" + , label = Init.LabelSelector.suffix "nix-store" + , attributes = toMap { root = "/nix/store" } } ] } diff --git a/nixos-modules/genode-core.nix b/nixos-modules/genode-core.nix index 97b8840..f4981e7 100644 --- a/nixos-modules/genode-core.nix +++ b/nixos-modules/genode-core.nix @@ -77,11 +77,6 @@ let config.genode.core.romModules))) }] } ]''); - /* storeRomPolicies = mapAttrsToList - (name: value: '', { mapKey = "${name}", mapValue = "${value}" }'') - romDirectories; - */ - extraRoutes = lib.concatStringsSep ", " (lib.lists.flatten (lib.mapAttrsToList (name: value: map (suffix: '' @@ -120,7 +115,7 @@ let ''; erisContents = lib.attrsets.mapAttrsToList (urn: source: { - target = "eris/" + urn; + target = urn; inherit source; }) config.genode.init.romModules; @@ -278,6 +273,10 @@ in { contents = erisContents; compressCommand = "cat"; compressionExtension = ""; + storeContents = lib.attrsets.mapAttrsToList (name: child: { + object = child.configFile; + symlink = "/config/${name}"; + }) config.genode.init.children; }; system.build.initXml = pkgs.buildPackages.runCommand "init.xml" {