sigil/nixos-modules/gui/nitpicker.dhall

54 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-03-28 15:07:21 +02:00
let Sigil = env:DHALL_SIGIL
2020-12-10 19:27:53 +01:00
2021-04-15 09:25:28 +02:00
let Prelude = Sigil.Prelude
let Map = Prelude.Map
let Attributes = Map.Type Text Text
let Domain = Map.Entry Text Attributes
let XML = Prelude.XML
2020-12-10 19:27:53 +01:00
2021-03-28 15:07:21 +02:00
let Init = Sigil.Init
2020-12-10 19:27:53 +01:00
2021-04-15 09:25:28 +02:00
in λ ( params
: { domains : List Domain, policies : List Init.Config.Policy.Type }
) →
λ(binary : Text) →
2020-12-10 19:27:53 +01:00
Init.Child.flat
Init.Child.Attributes::{
, binary
2021-03-28 15:07:21 +02:00
, resources = Init.Resources::{ ram = Sigil.units.MiB 4 }
2020-12-10 19:27:53 +01:00
, config = Init.Config::{
, attributes = toMap
{ note = "Nitpicker config is extremely fragile!" }
, content =
2021-04-15 09:25:28 +02:00
[ XML.leaf
{ name = "capture", attributes = XML.emptyAttributes }
, XML.leaf
{ name = "background"
, attributes = toMap { color = "#000000" }
2020-12-10 19:27:53 +01:00
}
2021-04-15 09:25:28 +02:00
]
# Prelude.List.map
Domain
XML.Type
( λ(domain : Domain) →
XML.leaf
{ name = "domain"
, attributes =
toMap { name = domain.mapKey } # domain.mapValue
}
)
params.domains
2020-12-10 19:27:53 +01:00
, policies =
params.policies
# [ Init.Config.Policy::{
, service = "Capture"
, label = Init.LabelSelector.prefix "fb_drv"
}
]
}
}