File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 194194 zone . children
195195 ) ;
196196
197- # fighting infinite recursion
198- zoneOptions = zoneOptionsRaw // childConfig zoneOptions1 true ;
199- zoneOptions1 = zoneOptionsRaw // childConfig zoneOptions2 false ;
200- zoneOptions2 = zoneOptionsRaw // childConfig zoneOptions3 false ;
201- zoneOptions3 = zoneOptionsRaw // childConfig zoneOptions4 false ;
202- zoneOptions4 = zoneOptionsRaw // childConfig zoneOptions5 false ;
203- zoneOptions5 = zoneOptionsRaw // childConfig zoneOptions6 false ;
204- zoneOptions6 = zoneOptionsRaw // childConfig null false ;
205-
206- childConfig = x : v : { options . children = { type = types . attrsOf x ; visible = v ; } ; } ;
207-
208197 # options are ordered alphanumerically
209- zoneOptionsRaw = types . submodule {
198+ zoneOptions = types . submodule {
210199 options = {
211200
212201 allowAXFRFallback = mkOption {
246235 } ;
247236
248237 children = mkOption {
238+ # TODO: This relies on the fact that `types.anything` doesn't set any
239+ # values of its own to any defaults, because in the above zoneConfigs',
240+ # values from children override ones from parents, but only if the
241+ # attributes are defined. Because of this, we can't replace the element
242+ # type here with `zoneConfigs`, since that would set all the attributes
243+ # to default values, breaking the parent inheriting function.
244+ type = types . attrsOf types . anything ;
249245 default = { } ;
250246 description = ''
251247 Children zones inherit all options of their parents. Attributes
Original file line number Diff line number Diff line change 6262 } ;
6363
6464 stateDir = mkOption {
65+ type = types . path ;
6566 default = "/var/lib/unbound" ;
6667 description = "Directory holding all state for unbound to run." ;
6768 } ;
Original file line number Diff line number Diff line change 153153
154154 userlist = mkOption {
155155 default = [ ] ;
156+ type = types . listOf types . str ;
156157 description = "See <option>userlistFile</option>." ;
157158 } ;
158159
Original file line number Diff line number Diff line change 219219
220220 session = mkOption {
221221 default = [ ] ;
222+ type = with types ; listOf ( submodule ( { ... } : {
223+ options = {
224+ manage = mkOption {
225+ description = "Whether this is a desktop or a window manager" ;
226+ type = enum [ "desktop" "window" ] ;
227+ } ;
228+
229+ name = mkOption {
230+ description = "Name of this session" ;
231+ type = str ;
232+ } ;
233+
234+ start = mkOption {
235+ description = "Commands to run to start this session" ;
236+ type = lines ;
237+ } ;
238+ } ;
239+ } ) ) ;
222240 example = literalExpression
223241 ''
224242 [ { manage = "desktop";
Original file line number Diff line number Diff line change 3636
3737 boot . kernelPackages = mkOption {
3838 default = pkgs . linuxPackages ;
39- type = types . unspecified // { merge = mergeEqualOption ; } ;
39+ type = types . raw ;
4040 apply = kernelPackages : kernelPackages . extend ( self : super : {
4141 kernel = super . kernel . override ( originalArgs : {
4242 inherit randstructSeed ;
Original file line number Diff line number Diff line change 581581 else "gzip"
582582 ) ;
583583 defaultText = literalDocBook "<literal>zstd</literal> if the kernel supports it (5.9+), <literal>gzip</literal> if not" ;
584- type = types . unspecified ; # We don't have a function type...
584+ type = types . either types . str ( types . functionTo types . str ) ;
585585 description = ''
586586 The compressor to use on the initrd image. May be any of:
587587
You can’t perform that action at this time.
0 commit comments