54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
let Sigil = env:DHALL_SIGIL
|
|
|
|
let Prelude = Sigil.Prelude
|
|
|
|
let Map = Prelude.Map
|
|
|
|
let Attributes = Map.Type Text Text
|
|
|
|
let Domain = Map.Entry Text Attributes
|
|
|
|
let XML = Prelude.XML
|
|
|
|
let Init = Sigil.Init
|
|
|
|
in λ ( params
|
|
: { domains : List Domain, policies : List Init.Config.Policy.Type }
|
|
) →
|
|
λ(binary : Text) →
|
|
Init.Child.flat
|
|
Init.Child.Attributes::{
|
|
, binary
|
|
, resources = Init.Resources::{ ram = Sigil.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 = "background"
|
|
, attributes = toMap { color = "#000000" }
|
|
}
|
|
]
|
|
# Prelude.List.map
|
|
Domain
|
|
XML.Type
|
|
( λ(domain : Domain) →
|
|
XML.leaf
|
|
{ name = "domain"
|
|
, attributes =
|
|
toMap { name = domain.mapKey } # domain.mapValue
|
|
}
|
|
)
|
|
params.domains
|
|
, policies =
|
|
params.policies
|
|
# [ Init.Config.Policy::{
|
|
, service = "Capture"
|
|
, label = Init.LabelSelector.prefix "fb_drv"
|
|
}
|
|
]
|
|
}
|
|
}
|