diff --git a/nixos-modules/hardware.nix b/nixos-modules/hardware.nix index 23a45c5..4066ac4 100644 --- a/nixos-modules/hardware.nix +++ b/nixos-modules/hardware.nix @@ -128,10 +128,14 @@ with lib; inputs = with pkgs.genodePackages; { lwip = [ vfs_lwip ]; - lxip = [ vfs_lixp ]; + lxip = [ vfs_lxip ]; }.${interface.genode.stack}; configFile = let binary = "${pkgs.genodePackages.vfs}/bin/vfs"; + ram = { + lwip = 16; + lxip = 32; + }.${interface.genode.stack}; settings = with builtins; lib.optionals (interface.ipv4.addresses != [ ]) (let addr = head interface.ipv4.addresses; @@ -156,8 +160,9 @@ with lib; name = "dhcp"; value = if interface.useDHCP then "true" else "false"; }; - settingsMap = map ({ name, value }: - ''{ mapKey = "${name}", mapValue = "${value}" }'') settings; + settingsMap = builtins.concatStringsSep ", " (map + ({ name, value }: + ''{ mapKey = "${name}", mapValue = "${value}" }'') settings); in pkgs.writeText "${name'}.dhall" '' let Genode = env:DHALL_GENODE @@ -167,33 +172,26 @@ with lib; Init.Child.Attributes::{ , binary = "${binary}" , provides = [ "File_system" ] - , resources = Init.Resources::{ caps = 128, ram = Genode.units.MiB 16 } + , resources = Init.Resources::{ + , caps = 128 + , ram = Genode.units.MiB ${toString ram} + } , config = Init.Config::{ , policies = [ Init.Config.Policy::{ , service = "File_system" - , label = Init.LabelSelector.suffix "sockets" - , attributes = toMap { root = "/" } + , label = Init.LabelSelector.suffix "${name'}" + , attributes = toMap { root = "/", writeable="yes" } } ] , content = - let XML = Genode.Prelude.XML + let VFS = Genode.VFS - in [ XML.element - { name = "vfs" - , attributes = XML.emptyAttributes - , content = - [ XML.leaf - { name = "lwip" - , attributes = [ - ${ - builtins.concatStringsSep ", " - settingsMap - } - ] : Genode.Prelude.Map.Type Text Text - } - ] - } + in [ VFS.vfs + [ VFS.leafAttrs + "${interface.genode.stack}" + ([ ${settingsMap} ] : Genode.Prelude.Map.Type Text Text) + ] ] } } diff --git a/packages/genodelabs/depot-targets.nix b/packages/genodelabs/depot-targets.nix index a12d806..efe62bf 100644 --- a/packages/genodelabs/depot-targets.nix +++ b/packages/genodelabs/depot-targets.nix @@ -121,12 +121,13 @@ in { vfs_block = { }; vfs_import.patches = [ ./patches/vfs_import.patch ]; vfs_jitterentropy.portInputs = [ jitterentropy libc ]; + vfs_pipe = { }; + vfs_ttf.portInputs = [ libc stb ]; vfs_lwip = { patches = [ ./patches/lwip.patch ]; portInputs = [ lwip ]; }; - vfs_pipe = { }; - vfs_ttf.portInputs = [ libc stb ]; + vfs_lxip.portInputs = [ dde_linux ]; virtdev_rom = { };