WiP graphics test: fuck the backdrop

This commit is contained in:
Emery Hemingway 2021-04-14 17:57:59 +02:00
parent 00dd21d0c2
commit d2f265f806
2 changed files with 17 additions and 55 deletions

View File

@ -1,27 +1,26 @@
{
name = "tor";
name = "graphics";
machine = { config, lib, pkgs, ... }: {
virtualisation.memorySize = 768;
genode.gui.consoleLog.enable = true;
genode.core.storeBackend = "fs";
hardware.genode.usb.enable = true;
hardware.genode.usb.storage.enable = true;
services.tor = {
# enable = true;
client.enable = false;
extraConfig = ''
Log [general,net,config,fs]debug stdout
'';
relay = {
hardware.genode.framebuffer.driver = "boot";
hardware.genode.usb = {
enable = true;
port = 80;
role = "relay";
bridgeTransports = [ ];
biosHandoff = false;
storage.enable = true;
};
genode.init.verbose = true;
genode.init.children.hello = {
package = pkgs.hello;
configFile = ./hello.dhall;
};
};
testScript = ''
start_all()
machine.wait_until_serial_output("child \"init\" exited with exit value 0")
'';
}

View File

@ -1,37 +0,0 @@
let Sigil = env:DHALL_SIGIL
let Init = Sigil.Init
let Child = Init.Child
let Libc = Sigil.Libc
in λ(binary : Text) →
Child.flat
Child.Attributes::{
, binary
, resources = Sigil.Init.Resources::{
, caps = 256
, ram = Sigil.units.MiB 16
}
, config =
let cfg =
Libc.toConfig
Libc::{
, rtc = None Text
, vfs =
[ VFS.dir "dev" [ VFS.leaf "null", VFS.leaf "log" ]
, VFS.leafAttrs "rom" (toMap { name = "backdrop.png" })
]
}
in cfg
with content =
cfg.content
# [ XML.leaf
{ name = "image"
, attributes = toMap
{ png = "backdrop.png", anchor = "bottomright" }
}
]
}