mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-25 06:38:22 +03:00
nixos/treewide: Add last missing option types
Co-Authored-By: Janne Heß <janne@hess.ooo>
This commit is contained in:
parent
f5645dd73b
commit
b2d803ca57
@ -194,19 +194,8 @@ let
|
||||
zone.children
|
||||
);
|
||||
|
||||
# fighting infinite recursion
|
||||
zoneOptions = zoneOptionsRaw // childConfig zoneOptions1 true;
|
||||
zoneOptions1 = zoneOptionsRaw // childConfig zoneOptions2 false;
|
||||
zoneOptions2 = zoneOptionsRaw // childConfig zoneOptions3 false;
|
||||
zoneOptions3 = zoneOptionsRaw // childConfig zoneOptions4 false;
|
||||
zoneOptions4 = zoneOptionsRaw // childConfig zoneOptions5 false;
|
||||
zoneOptions5 = zoneOptionsRaw // childConfig zoneOptions6 false;
|
||||
zoneOptions6 = zoneOptionsRaw // childConfig null false;
|
||||
|
||||
childConfig = x: v: { options.children = { type = types.attrsOf x; visible = v; }; };
|
||||
|
||||
# options are ordered alphanumerically
|
||||
zoneOptionsRaw = types.submodule {
|
||||
zoneOptions = types.submodule {
|
||||
options = {
|
||||
|
||||
allowAXFRFallback = mkOption {
|
||||
@ -246,6 +235,13 @@ let
|
||||
};
|
||||
|
||||
children = mkOption {
|
||||
# TODO: This relies on the fact that `types.anything` doesn't set any
|
||||
# values of its own to any defaults, because in the above zoneConfigs',
|
||||
# values from children override ones from parents, but only if the
|
||||
# attributes are defined. Because of this, we can't replace the element
|
||||
# type here with `zoneConfigs`, since that would set all the attributes
|
||||
# to default values, breaking the parent inheriting function.
|
||||
type = types.attrsOf types.anything;
|
||||
default = {};
|
||||
description = ''
|
||||
Children zones inherit all options of their parents. Attributes
|
||||
|
@ -62,6 +62,7 @@ in {
|
||||
};
|
||||
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/unbound";
|
||||
description = "Directory holding all state for unbound to run.";
|
||||
};
|
||||
|
@ -153,6 +153,7 @@ in
|
||||
|
||||
userlist = mkOption {
|
||||
default = [];
|
||||
type = types.listOf types.str;
|
||||
description = "See <option>userlistFile</option>.";
|
||||
};
|
||||
|
||||
|
@ -219,6 +219,24 @@ in
|
||||
|
||||
session = mkOption {
|
||||
default = [];
|
||||
type = with types; listOf (submodule ({ ... }: {
|
||||
options = {
|
||||
manage = mkOption {
|
||||
description = "Whether this is a desktop or a window manager";
|
||||
type = enum [ "desktop" "window" ];
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
description = "Name of this session";
|
||||
type = str;
|
||||
};
|
||||
|
||||
start = mkOption {
|
||||
description = "Commands to run to start this session";
|
||||
type = lines;
|
||||
};
|
||||
};
|
||||
}));
|
||||
example = literalExpression
|
||||
''
|
||||
[ { manage = "desktop";
|
||||
|
@ -36,7 +36,7 @@ in
|
||||
|
||||
boot.kernelPackages = mkOption {
|
||||
default = pkgs.linuxPackages;
|
||||
type = types.unspecified // { merge = mergeEqualOption; };
|
||||
type = types.raw;
|
||||
apply = kernelPackages: kernelPackages.extend (self: super: {
|
||||
kernel = super.kernel.override (originalArgs: {
|
||||
inherit randstructSeed;
|
||||
|
@ -581,7 +581,7 @@ in
|
||||
else "gzip"
|
||||
);
|
||||
defaultText = literalDocBook "<literal>zstd</literal> if the kernel supports it (5.9+), <literal>gzip</literal> if not";
|
||||
type = types.unspecified; # We don't have a function type...
|
||||
type = types.either types.str (types.functionTo types.str);
|
||||
description = ''
|
||||
The compressor to use on the initrd image. May be any of:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user