nixos/*: fix docbook deprecation notices

mostly no rendering changes except in buildkite, which used markdown
where docbook was expected without marking up its markdown.
This commit is contained in:
pennae 2022-09-01 19:44:36 +02:00 committed by pennae
parent 767485a0de
commit d98322834b
14 changed files with 73 additions and 75 deletions

View file

@ -7,7 +7,7 @@ let
format = pkgs.formats.toml { }; format = pkgs.formats.toml { };
in { in {
options.programs.rust-motd = { options.programs.rust-motd = {
enable = mkEnableOption "rust-motd"; enable = mkEnableOption (lib.mdDoc "rust-motd");
enableMotdInSSHD = mkOption { enableMotdInSSHD = mkOption {
default = true; default = true;
type = types.bool; type = types.bool;

View file

@ -9,7 +9,7 @@ let
inherit name; inherit name;
value = mkOption { value = mkOption {
default = null; default = null;
inherit description; description = lib.mdDoc description;
type = types.nullOr types.lines; type = types.nullOr types.lines;
} // (if example == null then {} else { inherit example; }); } // (if example == null then {} else { inherit example; });
}; };

View file

@ -6,7 +6,7 @@ in {
meta = { maintainers = with lib.maintainers; [ numkem ]; }; meta = { maintainers = with lib.maintainers; [ numkem ]; };
options = { options = {
services.espanso = { enable = options.mkEnableOption "Espanso"; }; services.espanso = { enable = options.mkEnableOption (lib.mdDoc "Espanso"); };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -101,7 +101,7 @@ let
todosrht todosrht
]); ]);
mkOptionNullOrStr = description: mkOption { mkOptionNullOrStr = description: mkOption {
inherit description; description = lib.mdDoc description;
type = with types; nullOr str; type = with types; nullOr str;
default = null; default = null;
}; };

View file

@ -16,7 +16,7 @@ in
}; };
"${field}" = lib.mkOption { "${field}" = lib.mkOption {
type = int; type = int;
inherit description; description = lib.mdDoc description;
}; };
location = lib.mkOption { location = lib.mkOption {
type = str; type = str;

View file

@ -11,7 +11,7 @@ in
v2rayEndpoint = mkOption { v2rayEndpoint = mkOption {
type = types.str; type = types.str;
default = "127.0.0.1:54321"; default = "127.0.0.1:54321";
description = '' description = lib.mdDoc ''
v2ray grpc api endpoint v2ray grpc api endpoint
''; '';
}; };

View file

@ -396,12 +396,12 @@ in
}; };
precomputation.elgamal = mkEnableTrueOption "Precomputed ElGamal tables" // { precomputation.elgamal = mkEnableTrueOption "Precomputed ElGamal tables" // {
description = '' description = lib.mdDoc ''
Whenever to use precomputated tables for ElGamal. Whenever to use precomputated tables for ElGamal.
<command>i2pd</command> defaults to <literal>false</literal> {command}`i2pd` defaults to `false`
to save 64M of memory (and looses some performance). to save 64M of memory (and looses some performance).
We default to <literal>true</literal> as that is what most We default to `true` as that is what most
users want anyway. users want anyway.
''; '';
}; };

View file

@ -268,11 +268,11 @@ in
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
example = "/run/keys/keepalived.env"; example = "/run/keys/keepalived.env";
description = '' description = lib.mdDoc ''
Environment variables from this file will be interpolated into the Environment variables from this file will be interpolated into the
final config file using envsubst with this syntax: <literal>$ENVIRONMENT</literal> final config file using envsubst with this syntax: `$ENVIRONMENT`
or <literal>''${VARIABLE}</literal>. or `''${VARIABLE}`.
The file should contain lines formatted as <literal>SECRET_VAR=SECRET_VALUE</literal>. The file should contain lines formatted as `SECRET_VAR=SECRET_VALUE`.
This is useful to avoid putting secrets into the nix store. This is useful to avoid putting secrets into the nix store.
''; '';
}; };

View file

@ -152,7 +152,7 @@ rec {
option = mkOption { option = mkOption {
type = types.attrsOf (types.submodule {options = paramsToOptions params;}); type = types.attrsOf (types.submodule {options = paramsToOptions params;});
default = {}; default = {};
inherit description; description = lib.mdDoc description;
}; };
render = postfix: attrs: render = postfix: attrs:
let postfixedAttrs = mapAttrs' (name: nameValuePair "${name}-${postfix}") attrs; let postfixedAttrs = mapAttrs' (name: nameValuePair "${name}-${postfix}") attrs;

View file

@ -187,12 +187,12 @@ in {
}; };
allowAuxiliaryImperativeNetworks = mkEnableOption (lib.mdDoc "support for imperative & declarative networks") // { allowAuxiliaryImperativeNetworks = mkEnableOption (lib.mdDoc "support for imperative & declarative networks") // {
description = '' description = lib.mdDoc ''
Whether to allow configuring networks "imperatively" (e.g. via Whether to allow configuring networks "imperatively" (e.g. via
<literal>wpa_supplicant_gui</literal>) and declaratively via `wpa_supplicant_gui`) and declaratively via
<xref linkend="opt-networking.wireless.networks"/>. [](#opt-networking.wireless.networks).
Please note that this adds a custom patch to <literal>wpa_supplicant</literal>. Please note that this adds a custom patch to `wpa_supplicant`.
''; '';
}; };

View file

@ -48,12 +48,12 @@ in
{ {
# interface # interface
options.services.dolibarr = { options.services.dolibarr = {
enable = mkEnableOption "dolibarr"; enable = mkEnableOption (lib.mdDoc "dolibarr");
domain = mkOption { domain = mkOption {
type = types.str; type = types.str;
default = "localhost"; default = "localhost";
description = '' description = lib.mdDoc ''
Domain name of your server. Domain name of your server.
''; '';
}; };
@ -61,35 +61,35 @@ in
user = mkOption { user = mkOption {
type = types.str; type = types.str;
default = "dolibarr"; default = "dolibarr";
description = '' description = lib.mdDoc ''
User account under which dolibarr runs. User account under which dolibarr runs.
<note><para> ::: {.note}
If left as the default value this user will automatically be created If left as the default value this user will automatically be created
on system activation, otherwise you are responsible for on system activation, otherwise you are responsible for
ensuring the user exists before the dolibarr application starts. ensuring the user exists before the dolibarr application starts.
</para></note> :::
''; '';
}; };
group = mkOption { group = mkOption {
type = types.str; type = types.str;
default = "dolibarr"; default = "dolibarr";
description = '' description = lib.mdDoc ''
Group account under which dolibarr runs. Group account under which dolibarr runs.
<note><para> ::: {.note}
If left as the default value this group will automatically be created If left as the default value this group will automatically be created
on system activation, otherwise you are responsible for on system activation, otherwise you are responsible for
ensuring the group exists before the dolibarr application starts. ensuring the group exists before the dolibarr application starts.
</para></note> :::
''; '';
}; };
stateDir = mkOption { stateDir = mkOption {
type = types.str; type = types.str;
default = "/var/lib/dolibarr"; default = "/var/lib/dolibarr";
description = '' description = lib.mdDoc ''
State and configuration directory dolibarr will use. State and configuration directory dolibarr will use.
''; '';
}; };
@ -98,33 +98,33 @@ in
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = "localhost"; default = "localhost";
description = "Database host address."; description = lib.mdDoc "Database host address.";
}; };
port = mkOption { port = mkOption {
type = types.port; type = types.port;
default = 3306; default = 3306;
description = "Database host port."; description = lib.mdDoc "Database host port.";
}; };
name = mkOption { name = mkOption {
type = types.str; type = types.str;
default = "dolibarr"; default = "dolibarr";
description = "Database name."; description = lib.mdDoc "Database name.";
}; };
user = mkOption { user = mkOption {
type = types.str; type = types.str;
default = "dolibarr"; default = "dolibarr";
description = "Database username."; description = lib.mdDoc "Database username.";
}; };
passwordFile = mkOption { passwordFile = mkOption {
type = with types; nullOr path; type = with types; nullOr path;
default = null; default = null;
example = "/run/keys/dolibarr-dbpassword"; example = "/run/keys/dolibarr-dbpassword";
description = "Database password file."; description = lib.mdDoc "Database password file.";
}; };
createLocally = mkOption { createLocally = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = "Create the database and database user locally."; description = lib.mdDoc "Create the database and database user locally.";
}; };
}; };

View file

@ -133,45 +133,45 @@ let
in { in {
options.services.writefreely = { options.services.writefreely = {
enable = enable =
lib.mkEnableOption "Writefreely, build a digital writing community"; lib.mkEnableOption (lib.mdDoc "Writefreely, build a digital writing community");
package = lib.mkOption { package = lib.mkOption {
type = lib.types.package; type = lib.types.package;
default = pkgs.writefreely; default = pkgs.writefreely;
defaultText = lib.literalExpression "pkgs.writefreely"; defaultText = lib.literalExpression "pkgs.writefreely";
description = "Writefreely package to use."; description = lib.mdDoc "Writefreely package to use.";
}; };
stateDir = mkOption { stateDir = mkOption {
type = types.path; type = types.path;
default = "/var/lib/writefreely"; default = "/var/lib/writefreely";
description = "The state directory where keys and data are stored."; description = lib.mdDoc "The state directory where keys and data are stored.";
}; };
user = mkOption { user = mkOption {
type = types.str; type = types.str;
default = "writefreely"; default = "writefreely";
description = "User under which Writefreely is ran."; description = lib.mdDoc "User under which Writefreely is ran.";
}; };
group = mkOption { group = mkOption {
type = types.str; type = types.str;
default = "writefreely"; default = "writefreely";
description = "Group under which Writefreely is ran."; description = lib.mdDoc "Group under which Writefreely is ran.";
}; };
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
description = "The public host name to serve."; description = lib.mdDoc "The public host name to serve.";
example = "example.com"; example = "example.com";
}; };
settings = mkOption { settings = mkOption {
default = { }; default = { };
description = '' description = lib.mdDoc ''
Writefreely configuration (<filename>config.ini</filename>). Refer to Writefreely configuration ({file}`config.ini`). Refer to
<link xlink:href="https://writefreely.org/docs/latest/admin/config" /> <https://writefreely.org/docs/latest/admin/config>
for details. for details.
''; '';
@ -183,7 +183,7 @@ in {
theme = mkOption { theme = mkOption {
type = types.str; type = types.str;
default = "write"; default = "write";
description = "The theme to apply."; description = lib.mdDoc "The theme to apply.";
}; };
}; };
@ -192,7 +192,7 @@ in {
type = types.port; type = types.port;
default = if cfg.nginx.enable then 18080 else 80; default = if cfg.nginx.enable then 18080 else 80;
defaultText = "80"; defaultText = "80";
description = "The port WriteFreely should listen on."; description = lib.mdDoc "The port WriteFreely should listen on.";
}; };
}; };
}; };
@ -203,60 +203,60 @@ in {
type = mkOption { type = mkOption {
type = types.enum [ "sqlite3" "mysql" ]; type = types.enum [ "sqlite3" "mysql" ];
default = "sqlite3"; default = "sqlite3";
description = "The database provider to use."; description = lib.mdDoc "The database provider to use.";
}; };
name = mkOption { name = mkOption {
type = types.str; type = types.str;
default = "writefreely"; default = "writefreely";
description = "The name of the database to store data in."; description = lib.mdDoc "The name of the database to store data in.";
}; };
user = mkOption { user = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = if cfg.database.type == "mysql" then "writefreely" else null; default = if cfg.database.type == "mysql" then "writefreely" else null;
defaultText = "writefreely"; defaultText = "writefreely";
description = "The database user to connect as."; description = lib.mdDoc "The database user to connect as.";
}; };
passwordFile = mkOption { passwordFile = mkOption {
type = types.nullOr types.path; type = types.nullOr types.path;
default = null; default = null;
description = "The file to load the database password from."; description = lib.mdDoc "The file to load the database password from.";
}; };
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = "localhost"; default = "localhost";
description = "The database host to connect to."; description = lib.mdDoc "The database host to connect to.";
}; };
port = mkOption { port = mkOption {
type = types.port; type = types.port;
default = 3306; default = 3306;
description = "The port used when connecting to the database host."; description = lib.mdDoc "The port used when connecting to the database host.";
}; };
tls = mkOption { tls = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = description =
"Whether or not TLS should be used for the database connection."; lib.mdDoc "Whether or not TLS should be used for the database connection.";
}; };
migrate = mkOption { migrate = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = description =
"Whether or not to automatically run migrations on startup."; lib.mdDoc "Whether or not to automatically run migrations on startup.";
}; };
createLocally = mkOption { createLocally = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = lib.mdDoc ''
When <option>services.writefreely.database.type</option> is set to When {option}`services.writefreely.database.type` is set to
<code>"mysql"</code>, this option will enable the MySQL service locally. `"mysql"`, this option will enable the MySQL service locally.
''; '';
}; };
}; };
@ -264,15 +264,15 @@ in {
admin = { admin = {
name = mkOption { name = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
description = "The name of the first admin user."; description = lib.mdDoc "The name of the first admin user.";
default = null; default = null;
}; };
initialPasswordFile = mkOption { initialPasswordFile = mkOption {
type = types.path; type = types.path;
description = '' description = lib.mdDoc ''
Path to a file containing the initial password for the admin user. Path to a file containing the initial password for the admin user.
If not provided, the default password will be set to <code>nixos</code>. If not provided, the default password will be set to `nixos`.
''; '';
default = pkgs.writeText "default-admin-pass" "nixos"; default = pkgs.writeText "default-admin-pass" "nixos";
defaultText = "/nix/store/xxx-default-admin-pass"; defaultText = "/nix/store/xxx-default-admin-pass";
@ -284,13 +284,13 @@ in {
type = types.bool; type = types.bool;
default = false; default = false;
description = description =
"Whether or not to enable and configure nginx as a proxy for WriteFreely."; lib.mdDoc "Whether or not to enable and configure nginx as a proxy for WriteFreely.";
}; };
forceSSL = mkOption { forceSSL = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "Whether or not to force the use of SSL."; description = lib.mdDoc "Whether or not to force the use of SSL.";
}; };
}; };
@ -299,7 +299,7 @@ in {
type = types.bool; type = types.bool;
default = false; default = false;
description = description =
"Whether or not to automatically fetch and configure SSL certs."; lib.mdDoc "Whether or not to automatically fetch and configure SSL certs.";
}; };
}; };
}; };

View file

@ -1257,11 +1257,10 @@ let
default = {}; default = {};
example = { Route = "fd00::/64"; }; example = { Route = "fd00::/64"; };
type = types.addCheck (types.attrsOf unitOption) check.network.sectionIPv6RoutePrefix; type = types.addCheck (types.attrsOf unitOption) check.network.sectionIPv6RoutePrefix;
description = '' description = lib.mdDoc ''
Each attribute in this set specifies an option in the Each attribute in this set specifies an option in the
<literal>[IPv6RoutePrefix]</literal> section of the unit. See `[IPv6RoutePrefix]` section of the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle> {manpage}`systemd.network(5)` for details.
<manvolnum>5</manvolnum></citerefentry> for details.
''; '';
}; };
}; };
@ -1413,10 +1412,9 @@ let
default = []; default = [];
example = [ { ipv6RoutePrefixConfig = { Route = "fd00::/64"; LifetimeSec = 3600; }; } ]; example = [ { ipv6RoutePrefixConfig = { Route = "fd00::/64"; LifetimeSec = 3600; }; } ];
type = with types; listOf (submodule ipv6RoutePrefixOptions); type = with types; listOf (submodule ipv6RoutePrefixOptions);
description = '' description = lib.mdDoc ''
A list of ipv6RoutePrefix sections to be added to the unit. See A list of ipv6RoutePrefix sections to be added to the unit. See
<citerefentry><refentrytitle>systemd.network</refentrytitle> {manpage}`systemd.network(5)` for details.
<manvolnum>5</manvolnum></citerefentry> for details.
''; '';
}; };

View file

@ -584,7 +584,7 @@ in
example = literalExpression '' example = literalExpression ''
import pkgs.path { system = "x86_64-darwin"; } import pkgs.path { system = "x86_64-darwin"; }
''; '';
description = '' description = lib.mdDoc ''
pkgs set to use for the host-specific packages of the vm runner. pkgs set to use for the host-specific packages of the vm runner.
Changing this to e.g. a Darwin package set allows running NixOS VMs on Darwin. Changing this to e.g. a Darwin package set allows running NixOS VMs on Darwin.
''; '';