nixos/virtualization: invariant option docs MD conversions

This commit is contained in:
pennae 2022-07-20 12:32:04 +02:00
parent b115622f4b
commit 5bf55a4ad5
9 changed files with 66 additions and 66 deletions

View File

@ -10,7 +10,7 @@ let
address = mkOption {
default = addr;
type = types.str;
description = ''
description = lib.mdDoc ''
IPv${toString v} ${name} address.
'';
};
@ -18,9 +18,9 @@ let
prefixLength = mkOption {
default = pref;
type = types.addCheck types.int (n: n >= 0 && n <= (if v == 4 then 32 else 128));
description = ''
description = lib.mdDoc ''
Subnet mask of the ${name} address, specified as the number of
bits in the prefix (<literal>${if v == 4 then "24" else "64"}</literal>).
bits in the prefix (`${if v == 4 then "24" else "64"}`).
'';
};
};
@ -37,7 +37,7 @@ in
default = pkgs.anbox.image;
defaultText = literalExpression "pkgs.anbox.image";
type = types.package;
description = ''
description = lib.mdDoc ''
Base android image for Anbox.
'';
};
@ -45,7 +45,7 @@ in
extraInit = mkOption {
type = types.lines;
default = "";
description = ''
description = lib.mdDoc ''
Extra shell commands to be run inside the container image during init.
'';
};
@ -57,7 +57,7 @@ in
dns = mkOption {
default = "1.1.1.1";
type = types.str;
description = ''
description = lib.mdDoc ''
Container DNS server.
'';
};

View File

@ -25,8 +25,8 @@ in
options = {
virtualisation.vmVariant = mkOption {
description = ''
Machine configuration to be added for the vm script produced by <literal>nixos-rebuild build-vm</literal>.
description = lib.mdDoc ''
Machine configuration to be added for the vm script produced by `nixos-rebuild build-vm`.
'';
inherit (vmVariant) type;
default = {};
@ -34,8 +34,8 @@ in
};
virtualisation.vmVariantWithBootLoader = mkOption {
description = ''
Machine configuration to be added for the vm script produced by <literal>nixos-rebuild build-vm-with-bootloader</literal>.
description = lib.mdDoc ''
Machine configuration to be added for the vm script produced by `nixos-rebuild build-vm-with-bootloader`.
'';
inherit (vmVariantWithBootLoader) type;
default = {};

View File

@ -31,7 +31,7 @@ in
mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
This option enables the common /etc/containers configuration module.
'';
};
@ -39,13 +39,13 @@ in
ociSeccompBpfHook.enable = mkOption {
type = types.bool;
default = false;
description = "Enable the OCI seccomp BPF hook";
description = lib.mdDoc "Enable the OCI seccomp BPF hook";
};
containersConf.settings = mkOption {
type = toml.type;
default = { };
description = "containers.conf configuration";
description = lib.mdDoc "containers.conf configuration";
};
containersConf.cniPlugins = mkOption {
@ -60,7 +60,7 @@ in
pkgs.cniPlugins.dnsname
]
'';
description = ''
description = lib.mdDoc ''
CNI plugins to install on the system.
'';
};
@ -74,14 +74,14 @@ in
runroot = "/run/containers/storage";
};
};
description = "storage.conf configuration";
description = lib.mdDoc "storage.conf configuration";
};
registries = {
search = mkOption {
type = types.listOf types.str;
default = [ "docker.io" "quay.io" ];
description = ''
description = lib.mdDoc ''
List of repositories to search.
'';
};
@ -89,7 +89,7 @@ in
insecure = mkOption {
default = [];
type = types.listOf types.str;
description = ''
description = lib.mdDoc ''
List of insecure repositories.
'';
};
@ -97,7 +97,7 @@ in
block = mkOption {
default = [];
type = types.listOf types.str;
description = ''
description = lib.mdDoc ''
List of blocked repositories.
'';
};
@ -116,10 +116,10 @@ in
};
}
'';
description = ''
description = lib.mdDoc ''
Signature verification policy file.
If this option is empty the default policy file from
<literal>skopeo</literal> will be used.
`skopeo` will be used.
'';
};

View File

@ -13,7 +13,7 @@ in
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 4096;
description = ''
description = lib.mdDoc ''
Size of disk image. Unit is MB.
'';
};
@ -21,12 +21,12 @@ in
virtualisation.digitalOceanImage.configFile = mkOption {
type = with types; nullOr path;
default = null;
description = ''
description = lib.mdDoc ''
A path to a configuration file which will be placed at
<literal>/etc/nixos/configuration.nix</literal> and be used when switching
to a new configuration. If set to <literal>null</literal>, a default
`/etc/nixos/configuration.nix` and be used when switching
to a new configuration. If set to `null`, a default
configuration is used that imports
<literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>.
`(modulesPath + "/virtualisation/digital-ocean-config.nix")`.
'';
};
@ -34,7 +34,7 @@ in
type = types.enum [ "gzip" "bzip2" ];
default = "gzip";
example = "bzip2";
description = ''
description = lib.mdDoc ''
Disk image compression method. Choose bzip2 to generate smaller images that
take longer to generate but will consume less metered storage space on your
Digital Ocean account.

View File

@ -15,18 +15,18 @@ in {
type = types.bool;
default = true;
example = true;
description = "Whether to reconfigure the system from Digital Ocean user data";
description = lib.mdDoc "Whether to reconfigure the system from Digital Ocean user data";
};
options.virtualisation.digitalOcean.defaultConfigFile = mkOption {
type = types.path;
default = defaultConfigFile;
defaultText = literalDocBook ''
The default configuration imports user-data if applicable and
<literal>(modulesPath + "/virtualisation/digital-ocean-config.nix")</literal>.
`(modulesPath + "/virtualisation/digital-ocean-config.nix")`.
'';
description = ''
description = lib.mdDoc ''
A path to a configuration file which will be placed at
<literal>/etc/nixos/configuration.nix</literal> and be used when switching to
`/etc/nixos/configuration.nix` and be used when switching to
a new configuration.
'';
};

View File

@ -18,18 +18,18 @@ in
enable = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
This option enables docker in a rootless mode, a daemon that manages
linux containers. To interact with the daemon, one needs to set
<command>DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock</command>.
{command}`DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock`.
'';
};
setSocketVariable = mkOption {
type = types.bool;
default = false;
description = ''
Point <command>DOCKER_HOST</command> to rootless Docker instance for
description = lib.mdDoc ''
Point {command}`DOCKER_HOST` to rootless Docker instance for
normal users by default.
'';
};
@ -41,7 +41,7 @@ in
ipv6 = true;
"fixed-cidr-v6" = "fd00::/80";
};
description = ''
description = lib.mdDoc ''
Configuration for docker daemon. The attributes are serialized to JSON used as daemon.conf.
See https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
'';
@ -51,7 +51,7 @@ in
default = pkgs.docker;
defaultText = literalExpression "pkgs.docker";
type = types.package;
description = ''
description = lib.mdDoc ''
Docker package to be used in the module.
'';
};

View File

@ -13,7 +13,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to enable Open vSwitch. A configuration daemon (ovs-server)
will be started.
'';
@ -22,9 +22,9 @@ in {
resetOnStart = mkOption {
type = types.bool;
default = false;
description = ''
description = lib.mdDoc ''
Whether to reset the Open vSwitch configuration database to a default
configuration on every start of the systemd <literal>ovsdb.service</literal>.
configuration on every start of the systemd `ovsdb.service`.
'';
};
@ -32,7 +32,7 @@ in {
type = types.package;
default = pkgs.openvswitch;
defaultText = literalExpression "pkgs.openvswitch";
description = ''
description = lib.mdDoc ''
Open vSwitch package to use.
'';
};

View File

@ -14,42 +14,42 @@ in {
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 50 * 1024;
description = ''
description = lib.mdDoc ''
The size of the VirtualBox base image in MiB.
'';
};
baseImageFreeSpace = mkOption {
type = with types; int;
default = 30 * 1024;
description = ''
description = lib.mdDoc ''
Free space in the VirtualBox base image in MiB.
'';
};
memorySize = mkOption {
type = types.int;
default = 1536;
description = ''
description = lib.mdDoc ''
The amount of RAM the VirtualBox appliance can use in MiB.
'';
};
vmDerivationName = mkOption {
type = types.str;
default = "nixos-ova-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
description = ''
description = lib.mdDoc ''
The name of the derivation for the VirtualBox appliance.
'';
};
vmName = mkOption {
type = types.str;
default = "NixOS ${config.system.nixos.label} (${pkgs.stdenv.hostPlatform.system})";
description = ''
description = lib.mdDoc ''
The name of the VirtualBox appliance.
'';
};
vmFileName = mkOption {
type = types.str;
default = "nixos-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.ova";
description = ''
description = lib.mdDoc ''
The file name of the VirtualBox appliance.
'';
};
@ -60,10 +60,10 @@ in {
rtcuseutc = "on";
usb = "off";
};
description = ''
description = lib.mdDoc ''
Parameters passed to the Virtualbox appliance.
Run <literal>VBoxManage modifyvm --help</literal> to see more options.
Run `VBoxManage modifyvm --help` to see more options.
'';
};
exportParams = mkOption {
@ -72,14 +72,14 @@ in {
"--vsys" "0" "--vendor" "ACME Inc."
];
default = [];
description = ''
description = lib.mdDoc ''
Parameters passed to the Virtualbox export command.
Run <literal>VBoxManage export --help</literal> to see more options.
Run `VBoxManage export --help` to see more options.
'';
};
extraDisk = mkOption {
description = ''
description = lib.mdDoc ''
Optional extra disk/hdd configuration.
The disk will be an 'ext4' partition on a separate VMDK file.
'';
@ -93,16 +93,16 @@ in {
options = {
size = mkOption {
type = types.int;
description = "Size in MiB";
description = lib.mdDoc "Size in MiB";
};
label = mkOption {
type = types.str;
default = "vm-extra-storage";
description = "Label for the disk partition";
description = lib.mdDoc "Label for the disk partition";
};
mountPoint = mkOption {
type = types.str;
description = "Path where to mount this disk.";
description = lib.mdDoc "Path where to mount this disk.";
};
};
});

View File

@ -37,7 +37,7 @@ in
type = types.package;
defaultText = literalExpression "pkgs.xen";
example = literalExpression "pkgs.xen-light";
description = ''
description = lib.mdDoc ''
The package used for Xen binary.
'';
relatedPackages = [ "xen" "xen-light" ];
@ -47,7 +47,7 @@ in
type = types.package;
defaultText = literalExpression "pkgs.xen";
example = literalExpression "pkgs.qemu_xen-light";
description = ''
description = lib.mdDoc ''
The package with qemu binaries for dom0 qemu and xendomains.
'';
relatedPackages = [ "xen"
@ -59,7 +59,7 @@ in
mkOption {
default = [];
type = types.listOf types.str;
description =
description = lib.mdDoc
''
Parameters passed to the Xen hypervisor at boot time.
'';
@ -70,7 +70,7 @@ in
default = 0;
example = 512;
type = types.addCheck types.int (n: n >= 0);
description =
description = lib.mdDoc
''
Amount of memory (in MiB) allocated to Domain 0 on boot.
If set to 0, all memory is assigned to Domain 0.
@ -81,7 +81,7 @@ in
name = mkOption {
default = "xenbr0";
type = types.str;
description = ''
description = lib.mdDoc ''
Name of bridge the Xen domUs connect to.
'';
};
@ -89,7 +89,7 @@ in
address = mkOption {
type = types.str;
default = "172.16.0.1";
description = ''
description = lib.mdDoc ''
IPv4 address of the bridge.
'';
};
@ -97,9 +97,9 @@ in
prefixLength = mkOption {
type = types.addCheck types.int (n: n >= 0 && n <= 32);
default = 16;
description = ''
description = lib.mdDoc ''
Subnet mask of the bridge interface, specified as the number of
bits in the prefix (<literal>24</literal>).
bits in the prefix (`24`).
A DHCP server will provide IP addresses for the whole, remaining
subnet.
'';
@ -108,8 +108,8 @@ in
forwardDns = mkOption {
type = types.bool;
default = false;
description = ''
If set to <literal>true</literal>, the DNS queries from the
description = lib.mdDoc ''
If set to `true`, the DNS queries from the
hosts connected to the bridge will be forwarded to the DNS
servers specified in /etc/resolv.conf .
'';
@ -120,7 +120,7 @@ in
virtualisation.xen.stored =
mkOption {
type = types.path;
description =
description = lib.mdDoc
''
Xen Store daemon to use. Defaults to oxenstored of the xen package.
'';
@ -130,7 +130,7 @@ in
extraConfig = mkOption {
type = types.lines;
default = "";
description =
description = lib.mdDoc
''
Options defined here will override the defaults for xendomains.
The default options can be seen in the file included from