sigil/nixos-modules/gui/nitpicker.dhall
Emery Hemingway 2afd2d08cc nixos: add genode.init.children.<…>.binary option
Require that all init children declared by Nix be declared with
an absolute path to the program binary.
2021-02-16 15:46:14 +01:00

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" }
}
}
}