{ config, lib, pkgs, ... }: let toDhall = lib.generators.toDhall { }; cfg = config.services.tor; in { config = lib.mkIf config.services.tor.enable { genode.init.children.tor = let args = lib.strings.splitString " " config.systemd.services.tor.serviceConfig.ExecStart; tor' = lib.getEris' "bin" pkgs.tor "tor"; lwip' = lib.getEris "lib" pkgs.genodePackages.lwip; in { binary = builtins.head args; package = pkgs.tor; extraErisInputs = [ tor' lwip' ]; configFile = pkgs.writeText "tor.dhall" "${./tor.dhall} ${toDhall args} ${lwip'.cap}"; uplinks.eth0 = { driver = "virtio"; dump = true; verbose = true; }; }; }; }