Emery Hemingway
2afd2d08cc
Require that all init children declared by Nix be declared with an absolute path to the program binary.
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
let Genode = env:DHALL_GENODE
|
|
|
|
let XML = Genode.Prelude.XML
|
|
|
|
let Init = Genode.Init
|
|
|
|
in λ(params : { policies : List Init.Config.Policy.Type }) →
|
|
λ(binary : Text) →
|
|
Init.Child.flat
|
|
Init.Child.Attributes::{
|
|
, binary
|
|
, resources = Init.Resources::{ ram = Genode.units.MiB 4 }
|
|
, config = Init.Config::{
|
|
, attributes = toMap
|
|
{ note = "Nitpicker config is extremely fragile!" }
|
|
, content =
|
|
[ XML.leaf { name = "capture", attributes = XML.emptyAttributes }
|
|
, XML.leaf
|
|
{ name = "domain"
|
|
, attributes = toMap
|
|
{ name = "default"
|
|
, layer = "1"
|
|
, content = "client"
|
|
, label = "no"
|
|
}
|
|
}
|
|
, XML.leaf
|
|
{ name = "background"
|
|
, attributes = toMap { color = "#000000" }
|
|
}
|
|
]
|
|
, policies =
|
|
params.policies
|
|
# [ Init.Config.Policy::{
|
|
, service = "Capture"
|
|
, label = Init.LabelSelector.prefix "fb_drv"
|
|
}
|
|
]
|
|
, defaultPolicy = Some Init.Config.DefaultPolicy::{
|
|
, attributes = toMap { domain = "default" }
|
|
}
|
|
}
|
|
}
|