···88in
99 {
1010 options.hardware.tuxedo-keyboard = {
1111- enable = mkEnableOption ''
1111+ enable = mkEnableOption (lib.mdDoc ''
1212 Enables the tuxedo-keyboard driver.
13131414- To configure the driver, pass the options to the <option>boot.kernelParams</option> configuration.
1414+ To configure the driver, pass the options to the {option}`boot.kernelParams` configuration.
1515 There are several parameters you can change. It's best to check at the source code description which options are supported.
1616- You can find all the supported parameters at: <link xlink:href="https://github.com/tuxedocomputers/tuxedo-keyboard#kernelparam"/>
1616+ You can find all the supported parameters at: <https://github.com/tuxedocomputers/tuxedo-keyboard#kernelparam>
17171818- In order to use the <literal>custom</literal> lighting with the maximumg brightness and a color of <literal>0xff0a0a</literal> one would put pass <option>boot.kernelParams</option> like this:
1818+ In order to use the `custom` lighting with the maximumg brightness and a color of `0xff0a0a` one would put pass {option}`boot.kernelParams` like this:
19192020- <programlisting>
2020+ ```
2121 boot.kernelParams = [
2222 "tuxedo_keyboard.mode=0"
2323 "tuxedo_keyboard.brightness=255"
2424 "tuxedo_keyboard.color_left=0xff0a0a"
2525 ];
2626- </programlisting>
2727- '';
2626+ ```
2727+ '');
2828 };
29293030 config = mkIf cfg.enable
+12-12
nixos/modules/misc/label.nix
···12121313 nixos.label = mkOption {
1414 type = types.strMatching "[a-zA-Z0-9:_\\.-]*";
1515- description = ''
1515+ description = lib.mdDoc ''
1616 NixOS version name to be used in the names of generated
1717 outputs and boot labels.
1818···2020 this is the option for you.
21212222 It can only contain letters, numbers and the following symbols:
2323- <literal>:</literal>, <literal>_</literal>, <literal>.</literal> and <literal>-</literal>.
2323+ `:`, `_`, `.` and `-`.
24242525- The default is <option>system.nixos.tags</option> separated by
2626- "-" + "-" + <envar>NIXOS_LABEL_VERSION</envar> environment
2525+ The default is {option}`system.nixos.tags` separated by
2626+ "-" + "-" + {env}`NIXOS_LABEL_VERSION` environment
2727 variable (defaults to the value of
2828- <option>system.nixos.version</option>).
2828+ {option}`system.nixos.version`).
29293030- Can be overriden by setting <envar>NIXOS_LABEL</envar>.
3030+ Can be overriden by setting {env}`NIXOS_LABEL`.
31313232 Useful for not loosing track of configurations built from different
3333 nixos branches/revisions, e.g.:
34343535- <programlisting>
3535+ ```
3636 #!/bin/sh
3737 today=`date +%Y%m%d`
3838 branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')`
3939 revision=`(cd nixpkgs ; git rev-parse HEAD)`
4040 export NIXOS_LABEL_VERSION="$today.$branch-''${revision:0:7}"
4141 nixos-rebuild switch
4242- </programlisting>
4242+ ```
4343 '';
4444 };
4545···4747 type = types.listOf types.str;
4848 default = [];
4949 example = [ "with-xen" ];
5050- description = ''
5050+ description = lib.mdDoc ''
5151 Strings to prefix to the default
5252- <option>system.nixos.label</option>.
5252+ {option}`system.nixos.label`.
53535454 Useful for not loosing track of configurations built with
5555 different options, e.g.:
56565757- <programlisting>
5757+ ```
5858 {
5959 system.nixos.tags = [ "with-xen" ];
6060 virtualisation.xen.enable = true;
6161 }
6262- </programlisting>
6262+ ```
6363 '';
6464 };
6565
+9-9
nixos/modules/misc/nixpkgs.nix
···311311 defaultText = lib.literalMD ''
312312 Traditionally `builtins.currentSystem`, but unset when invoking NixOS through `lib.nixosSystem`.
313313 '';
314314- description = ''
314314+ description = lib.mdDoc ''
315315 This option does not need to be specified for NixOS configurations
316316- with a recently generated <literal>hardware-configuration.nix</literal>.
316316+ with a recently generated `hardware-configuration.nix`.
317317318318 Specifies the Nix platform type on which NixOS should be built.
319319- It is better to specify <literal>nixpkgs.localSystem</literal> instead.
320320- <programlisting>
319319+ It is better to specify `nixpkgs.localSystem` instead.
320320+ ```
321321 {
322322 nixpkgs.system = ..;
323323 }
324324- </programlisting>
324324+ ```
325325 is the same as
326326- <programlisting>
326326+ ```
327327 {
328328 nixpkgs.localSystem.system = ..;
329329 }
330330- </programlisting>
331331- See <literal>nixpkgs.localSystem</literal> for more information.
330330+ ```
331331+ See `nixpkgs.localSystem` for more information.
332332333333- Ignored when <literal>nixpkgs.pkgs</literal>, <literal>nixpkgs.localSystem</literal> or <literal>nixpkgs.hostPlatform</literal> is set.
333333+ Ignored when `nixpkgs.pkgs`, `nixpkgs.localSystem` or `nixpkgs.hostPlatform` is set.
334334 '';
335335 };
336336 };
+4-4
nixos/modules/services/backup/duplicity.nix
···5454 secretFile = mkOption {
5555 type = types.nullOr types.path;
5656 default = null;
5757- description = ''
5757+ description = lib.mdDoc ''
5858 Path of a file containing secrets (gpg passphrase, access key...) in
5959 the format of EnvironmentFile as described by
6060- <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For example:
6161- <programlisting>
6060+ {manpage}`systemd.exec(5)`. For example:
6161+ ```
6262 PASSPHRASE=«...»
6363 AWS_ACCESS_KEY_ID=«...»
6464 AWS_SECRET_ACCESS_KEY=«...»
6565- </programlisting>
6565+ ```
6666 '';
6767 };
6868
+3-3
nixos/modules/services/databases/cockroachdb.nix
···5858 locality = mkOption {
5959 type = types.nullOr types.str;
6060 default = null;
6161- description = ''
6161+ description = lib.mdDoc ''
6262 An ordered, comma-separated list of key-value pairs that describe the
6363 topography of the machine. Topography might include country,
6464 datacenter or rack designations. Data is automatically replicated to
···6868 like datacenter. The tiers and order must be the same on all nodes.
6969 Including more tiers is better than including fewer. For example:
70707171- <programlisting>
7171+ ```
7272 country=us,region=us-west,datacenter=us-west-1b,rack=12
7373 country=ca,region=ca-east,datacenter=ca-east-2,rack=4
74747575 planet=earth,province=manitoba,colo=secondary,power=3
7676- </programlisting>
7676+ ```
7777 '';
7878 };
7979
+5-5
nixos/modules/services/development/zammad.nix
···149149 type = types.nullOr types.path;
150150 default = null;
151151 example = "/run/keys/secret_key_base";
152152- description = ''
152152+ description = lib.mdDoc ''
153153 The path to a file containing the
154154- <literal>secret_key_base</literal> secret.
154154+ `secret_key_base` secret.
155155156156- Zammad uses <literal>secret_key_base</literal> to encrypt
156156+ Zammad uses `secret_key_base` to encrypt
157157 the cookie store, which contains session data, and to digest
158158 user auth tokens.
159159160160 Needs to be a 64 byte long string of hexadecimal
161161 characters. You can generate one by running
162162163163- <programlisting>
163163+ ```
164164 openssl rand -hex 64 >/path/to/secret_key_base_file
165165- </programlisting>
165165+ ```
166166167167 This should be a string, not a nix path, since nix paths are
168168 copied into the world-readable nix store.
+6-6
nixos/modules/services/hardware/lcd.nix
···6161 usbPermissions = mkOption {
6262 type = bool;
6363 default = false;
6464- description = ''
6464+ description = lib.mdDoc ''
6565 Set group-write permissions on a USB device.
66666767 A USB connected LCD panel will most likely require having its
6868 permissions modified for lcdd to write to it. Enabling this option
6969 sets group-write permissions on the device identified by
7070- <option>services.hardware.lcd.usbVid</option> and
7171- <option>services.hardware.lcd.usbPid</option>. In order to find the
7272- values, you can run the <command>lsusb</command> command. Example
7070+ {option}`services.hardware.lcd.usbVid` and
7171+ {option}`services.hardware.lcd.usbPid`. In order to find the
7272+ values, you can run the {command}`lsusb` command. Example
7373 output:
74747575- <programlisting>
7575+ ```
7676 Bus 005 Device 002: ID 0403:c630 Future Technology Devices International, Ltd lcd2usb interface
7777- </programlisting>
7777+ ```
78787979 In this case the vendor id is 0403 and the product id is c630.
8080 '';
+6-6
nixos/modules/services/logging/awstats.nix
···2525 logFile = mkOption {
2626 type = types.str;
2727 example = "/var/log/nginx/access.log";
2828- description = ''
2828+ description = lib.mdDoc ''
2929 The log file to be scanned.
30303131 For mail, set this to
3232- <programlisting>
3232+ ```
3333 journalctl $OLD_CURSOR -u postfix.service | ''${pkgs.perl}/bin/perl ''${pkgs.awstats.out}/share/awstats/tools/maillogconvert.pl standard |
3434- </programlisting>
3434+ ```
3535 '';
3636 };
37373838 logFormat = mkOption {
3939 type = types.str;
4040 default = "1";
4141- description = ''
4141+ description = lib.mdDoc ''
4242 The log format being used.
43434444 For mail, set this to
4545- <programlisting>
4545+ ```
4646 %time2 %email %email_r %host %host_r %method %url %code %bytesd
4747- </programlisting>
4747+ ```
4848 '';
4949 };
5050
+7-7
nixos/modules/services/matrix/dendrite.nix
···5050 type = lib.types.nullOr lib.types.path;
5151 example = "/var/lib/dendrite/registration_secret";
5252 default = null;
5353- description = ''
5454- Environment file as defined in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
5353+ description = lib.mdDoc ''
5454+ Environment file as defined in {manpage}`systemd.exec(5)`.
5555 Secrets may be passed to the service without adding them to the world-readable
5656 Nix store, by specifying placeholder variables as the option value in Nix and
5757 setting these variables accordingly in the environment file. Currently only used
5858 for the registration secret to allow secure registration when
5959 client_api.registration_disabled is true.
60606161- <programlisting>
6161+ ```
6262 # snippet of dendrite-related config
6363 services.dendrite.settings.client_api.registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
6464- </programlisting>
6464+ ```
65656666- <programlisting>
6666+ ```
6767 # content of the environment file
6868 REGISTRATION_SHARED_SECRET=verysecretpassword
6969- </programlisting>
6969+ ```
70707171 Note that this file needs to be available on the host on which
7272- <literal>dendrite</literal> is running.
7272+ `dendrite` is running.
7373 '';
7474 };
7575 loadCredential = lib.mkOption {
+4-4
nixos/modules/services/misc/gitit.nix
···348348 mimeTypesFile = mkOption {
349349 type = types.path;
350350 default = "/etc/mime/types.info";
351351- description = ''
351351+ description = lib.mdDoc ''
352352 Specifies the path of a file containing mime type mappings. Each
353353 line of the file should contain two fields, separated by whitespace.
354354 The first field is the mime type, the second is a file extension.
355355 For example:
356356-<programlisting>
357357-video/x-ms-wmx wmx
358358-</programlisting>
356356+ ```
357357+ video/x-ms-wmx wmx
358358+ ```
359359 If the file is not found, some simple defaults will be used.
360360 '';
361361 };
+6-8
nixos/modules/services/misc/sssd.nix
···5454 environmentFile = mkOption {
5555 type = types.nullOr types.path;
5656 default = null;
5757- description = ''
5858- Environment file as defined in <citerefentry>
5959- <refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum>
6060- </citerefentry>.
5757+ description = lib.mdDoc ''
5858+ Environment file as defined in {manpage}`systemd.exec(5)`.
61596260 Secrets may be passed to the service without adding them to the world-readable
6361 Nix store, by specifying placeholder variables as the option value in Nix and
6462 setting these variables accordingly in the environment file.
65636666- <programlisting>
6464+ ```
6765 # snippet of sssd-related config
6866 [domain/LDAP]
6967 ldap_default_authtok = $SSSD_LDAP_DEFAULT_AUTHTOK
7070- </programlisting>
6868+ ```
71697272- <programlisting>
7070+ ```
7371 # contents of the environment file
7472 SSSD_LDAP_DEFAULT_AUTHTOK=verysecretpassword
7575- </programlisting>
7373+ ```
7674 '';
7775 };
7876 };
···1919 type = types.path;
2020 default = "/var/run/dovecot/stats";
2121 example = "/var/run/dovecot2/old-stats";
2222- description = ''
2222+ description = lib.mdDoc ''
2323 Path under which the stats socket is placed.
2424 The user/group under which the exporter runs,
2525 should be able to access the socket in order
2626 to scrape the metrics successfully.
27272828 Please keep in mind that the stats module has changed in
2929- <link xlink:href="https://wiki2.dovecot.org/Upgrading/2.3">Dovecot 2.3+</link> which
3030- is not <link xlink:href="https://github.com/kumina/dovecot_exporter/issues/8">compatible with this exporter</link>.
2929+ [Dovecot 2.3+](https://wiki2.dovecot.org/Upgrading/2.3) which
3030+ is not [compatible with this exporter](https://github.com/kumina/dovecot_exporter/issues/8).
31313232 The following extra config has to be passed to Dovecot to ensure that recent versions
3333 work with this exporter:
3434- <programlisting>
3434+ ```
3535 {
3636 services.prometheus.exporters.dovecot.enable = true;
3737 services.prometheus.exporters.dovecot.socketPath = "/var/run/dovecot2/old-stats";
···6060 }
6161 ''';
6262 }
6363- </programlisting>
6363+ ```
6464 '';
6565 };
6666 scopes = mkOption {
···112112 detectionDir = "/path/to/Maildir/new";
113113 } ]
114114 '';
115115- description = ''
115115+ description = lib.mdDoc ''
116116 List of servers that should be probed.
117117118118- <emphasis>Note:</emphasis> if your mailserver has <citerefentry><refentrytitle>rspamd</refentrytitle><manvolnum>8</manvolnum></citerefentry> configured,
118118+ *Note:* if your mailserver has {manpage}`rspamd(8)` configured,
119119 it can happen that emails from this exporter are marked as spam.
120120121121 It's possible to work around the issue with a config like this:
122122- <programlisting>
122122+ ```
123123 {
124124 services.rspamd.locals."multimap.conf".text = '''
125125 ALLOWLIST_PROMETHEUS {
···130130 }
131131 ''';
132132 }
133133- </programlisting>
133133+ ```
134134 '';
135135 };
136136 };
···3636 type = types.nullOr types.path;
3737 default = null;
3838 example = "/root/prometheus-postgres-exporter.env";
3939- description = ''
4040- Environment file as defined in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
3939+ description = lib.mdDoc ''
4040+ Environment file as defined in {manpage}`systemd.exec(5)`.
41414242 Secrets may be passed to the service without adding them to the
4343 world-readable Nix store, by specifying placeholder variables as
···46464747 Environment variables from this file will be interpolated into the
4848 config file using envsubst with this syntax:
4949- <literal>$ENVIRONMENT ''${VARIABLE}</literal>
4949+ `$ENVIRONMENT ''${VARIABLE}`
50505151 The main use is to set the DATA_SOURCE_NAME that contains the
5252 postgres password
···5454 note that contents from this file will override dataSourceName
5555 if you have set it from nix.
56565757- <programlisting>
5757+ ```
5858 # Content of the environment file
5959 DATA_SOURCE_NAME=postgresql://username:password@localhost:5432/postgres?sslmode=disable
6060- </programlisting>
6060+ ```
61616262 Note that this file needs to be available on the host on which
6363 this exporter is running.
···4040 type = types.nullOr types.path;
4141 default = null;
4242 example = "/run/secrets/litestream";
4343- description = ''
4444- Environment file as defined in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
4343+ description = lib.mdDoc ''
4444+ Environment file as defined in {manpage}`systemd.exec(5)`.
45454646 Secrets may be passed to the service without adding them to the
4747 world-readable Nix store, by specifying placeholder variables as
···5454 variable values. If no value is set then it will be replaced with an
5555 empty string.
56565757- <programlisting>
5757+ ```
5858 # Content of the environment file
5959 LITESTREAM_ACCESS_KEY_ID=AKIAxxxxxxxxxxxxxxxx
6060 LITESTREAM_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/xxxxxxxxx
6161- </programlisting>
6161+ ```
62626363 Note that this file needs to be available on the host on which
6464 this exporter is running.
+6-6
nixos/modules/services/networking/3proxy.nix
···1818 type = types.nullOr types.path;
1919 default = null;
2020 example = "/var/lib/3proxy/3proxy.passwd";
2121- description = ''
2121+ description = lib.mdDoc ''
2222 Load users and passwords from this file.
23232424 Example users file with plain-text passwords:
25252626- <programlisting>
2626+ ```
2727 test1:CL:password1
2828 test2:CL:password2
2929- </programlisting>
2929+ ```
30303131 Example users file with md5-crypted passwords:
32323333- <programlisting>
3333+ ```
3434 test1:CR:$1$tFkisVd2$1GA8JXkRmTXdLDytM/i3a1
3535 test2:CR:$1$rkpibm5J$Aq1.9VtYAn0JrqZ8M.1ME.
3636- </programlisting>
3636+ ```
37373838 You can generate md5-crypted passwords via https://unix4lyfe.org/crypt/
3939 Note that htpasswd tool generates incompatible md5-crypted passwords.
4040- Consult <link xlink:href="https://github.com/z3APA3A/3proxy/wiki/How-To-(incomplete)#USERS">documentation</link> for more information.
4040+ Consult [documentation](https://github.com/z3APA3A/3proxy/wiki/How-To-%28incomplete%29#USERS) for more information.
4141 '';
4242 };
4343 services = mkOption {
···3434{
3535 options = {
3636 services.firefox-syncserver = {
3737- enable = lib.mkEnableOption ''
3737+ enable = lib.mkEnableOption (lib.mdDoc ''
3838 the Firefox Sync storage service.
39394040 Out of the box this will not be very useful unless you also configure at least
4141 one service and one nodes by inserting them into the mysql database manually, e.g.
4242 by running
43434444- <programlisting>
4444+ ```
4545 INSERT INTO `services` (`id`, `service`, `pattern`) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}');
4646 INSERT INTO `nodes` (`id`, `service`, `node`, `available`, `current_load`,
4747 `capacity`, `downed`, `backoff`)
4848 VALUES ('1', '1', 'https://mydomain.tld', '1', '0', '10', '0', '0');
4949- </programlisting>
4949+ ```
50505151- <option>${opt.singleNode.enable}</option> does this automatically when enabled
5252- '';
5151+ {option}`${opt.singleNode.enable}` does this automatically when enabled
5252+ '');
53535454 package = lib.mkOption {
5555 type = lib.types.package;
···172172 userAccessFile = mkOption {
173173 type = path;
174174 default = "/etc/hosts.hfaxd";
175175- description = ''
176176- The <filename>hosts.hfaxd</filename>
175175+ description = lib.mdDoc ''
176176+ The {file}`hosts.hfaxd`
177177 file entry in the spooling area
178178 will be symlinked to the location given here.
179179 This file must exist and be
180180- readable only by the <literal>uucp</literal> user.
180180+ readable only by the `uucp` user.
181181 See hosts.hfaxd(5) for details.
182182 This configuration permits access for all users:
183183- <programlisting>
183183+ ```
184184 environment.etc."hosts.hfaxd" = {
185185 mode = "0600";
186186 user = "uucp";
187187 text = ".*";
188188 };
189189- </programlisting>
189189+ ```
190190 Note that host-based access can be controlled with
191191- <option>config.systemd.sockets.hylafax-hfaxd.listenStreams</option>;
191191+ {option}`config.systemd.sockets.hylafax-hfaxd.listenStreams`;
192192 by default, only 127.0.0.1 is permitted to connect.
193193 '';
194194 };
+7-7
nixos/modules/services/networking/murmur.nix
···261261 type = types.nullOr types.path;
262262 default = null;
263263 example = "/var/lib/murmur/murmurd.env";
264264- description = ''
265265- Environment file as defined in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
264264+ description = lib.mdDoc ''
265265+ Environment file as defined in {manpage}`systemd.exec(5)`.
266266267267 Secrets may be passed to the service without adding them to the world-readable
268268 Nix store, by specifying placeholder variables as the option value in Nix and
269269 setting these variables accordingly in the environment file.
270270271271- <programlisting>
271271+ ```
272272 # snippet of murmur-related config
273273 services.murmur.password = "$MURMURD_PASSWORD";
274274- </programlisting>
274274+ ```
275275276276- <programlisting>
276276+ ```
277277 # content of the environment file
278278 MURMURD_PASSWORD=verysecretpassword
279279- </programlisting>
279279+ ```
280280281281 Note that this file needs to be available on the host on which
282282- <literal>murmur</literal> is running.
282282+ `murmur` is running.
283283 '';
284284 };
285285 };
+14-14
nixos/modules/services/networking/ncdns.nix
···7878 default = config.networking.hostName;
7979 defaultText = literalExpression "config.networking.hostName";
8080 example = "example.com";
8181- description = ''
8181+ description = lib.mdDoc ''
8282 The hostname of this ncdns instance, which defaults to the machine
8383 hostname. If specified, ncdns lists the hostname as an NS record at
8484 the zone apex:
8585- <programlisting>
8585+ ```
8686 bit. IN NS ns1.example.com.
8787- </programlisting>
8787+ ```
8888 If unset ncdns will generate an internal psuedo-hostname under the
8989 zone, which will resolve to the value of
9090- <option>services.ncdns.identity.address</option>.
9090+ {option}`services.ncdns.identity.address`.
9191 If you are only using ncdns locally you can ignore this.
9292 '';
9393 };
···123123 dnssec.keys.public = mkOption {
124124 type = types.path;
125125 default = defaultFiles.public;
126126- description = ''
126126+ description = lib.mdDoc ''
127127 Path to the file containing the KSK public key.
128128- The key can be generated using the <literal>dnssec-keygen</literal>
129129- command, provided by the package <literal>bind</literal> as follows:
130130- <programlisting>
128128+ The key can be generated using the `dnssec-keygen`
129129+ command, provided by the package `bind` as follows:
130130+ ```
131131 $ dnssec-keygen -a RSASHA256 -3 -b 2048 -f KSK bit
132132- </programlisting>
132132+ ```
133133 '';
134134 };
135135···144144 dnssec.keys.zonePublic = mkOption {
145145 type = types.path;
146146 default = defaultFiles.zonePublic;
147147- description = ''
147147+ description = lib.mdDoc ''
148148 Path to the file containing the ZSK public key.
149149- The key can be generated using the <literal>dnssec-keygen</literal>
150150- command, provided by the package <literal>bind</literal> as follows:
151151- <programlisting>
149149+ The key can be generated using the `dnssec-keygen`
150150+ command, provided by the package `bind` as follows:
151151+ ```
152152 $ dnssec-keygen -a RSASHA256 -3 -b 2048 bit
153153- </programlisting>
153153+ ```
154154 '';
155155 };
156156
+4-4
nixos/modules/services/networking/nix-serve.nix
···3535 secretKeyFile = mkOption {
3636 type = types.nullOr types.str;
3737 default = null;
3838- description = ''
3838+ description = lib.mdDoc ''
3939 The path to the file used for signing derivation data.
4040 Generate with:
41414242- <programlisting>
4242+ ```
4343 nix-store --generate-binary-cache-key key-name secret-key-file public-key-file
4444- </programlisting>
4444+ ```
45454646- For more details see <citerefentry><refentrytitle>nix-store</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
4646+ For more details see {manpage}`nix-store(1)`.
4747 '';
4848 };
4949
+5-5
nixos/modules/services/security/hockeypuck.nix
···3737 };
3838 }
3939 '';
4040- description = ''
4040+ description = lib.mdDoc ''
4141 Configuration file for hockeypuck, here you can override
4242- certain settings (<literal>loglevel</literal> and
4343- <literal>openpgp.db.dsn</literal>) by just setting those values.
4242+ certain settings (`loglevel` and
4343+ `openpgp.db.dsn`) by just setting those values.
44444545 For other settings you need to use lib.mkForce to override them.
4646···4949 the database yourself.
50505151 Example:
5252- <programlisting>
5252+ ```
5353 services.postgresql = {
5454 enable = true;
5555 ensureDatabases = [ "hockeypuck" ];
···5858 ensurePermissions."DATABASE hockeypuck" = "ALL PRIVILEGES";
5959 }];
6060 };
6161- </programlisting>
6161+ ```
6262 '';
6363 };
6464 };
+7-7
nixos/modules/services/security/privacyidea.nix
···7272 type = types.nullOr types.path;
7373 default = null;
7474 example = "/root/privacyidea.env";
7575- description = ''
7575+ description = lib.mdDoc ''
7676 File to load as environment file. Environment variables
7777 from this file will be interpolated into the config file
7878- using <literal>envsubst</literal> which is helpful for specifying
7878+ using `envsubst` which is helpful for specifying
7979 secrets:
8080- <programlisting>
8181- { <xref linkend="opt-services.privacyidea.secretKey"/> = "$SECRET"; }
8282- </programlisting>
8080+ ```
8181+ { services.privacyidea.secretKey = "$SECRET"; }
8282+ ```
83838484 The environment-file can now specify the actual secret key:
8585- <programlisting>
8585+ ```
8686 SECRET=veryverytopsecret
8787- </programlisting>
8787+ ```
8888 '';
8989 };
9090
+5-5
nixos/modules/services/security/vault.nix
···141141 extraSettingsPaths = mkOption {
142142 type = types.listOf types.path;
143143 default = [];
144144- description = ''
144144+ description = lib.mdDoc ''
145145 Configuration files to load besides the immutable one defined by the NixOS module.
146146 This can be used to avoid putting credentials in the Nix store, which can be read by any user.
147147148148 Each path can point to a JSON- or HCL-formatted file, or a directory
149149- to be scanned for files with <literal>.hcl</literal> or
150150- <literal>.json</literal> extensions.
149149+ to be scanned for files with `.hcl` or
150150+ `.json` extensions.
151151152152 To upload the confidential file with NixOps, use for example:
153153154154- <programlisting><![CDATA[
154154+ ```
155155 # https://releases.nixos.org/nixops/latest/manual/manual.html#opt-deployment.keys
156156 deployment.keys."vault.hcl" = let db = import ./db-credentials.nix; in {
157157 text = ${"''"}
···164164 services.vault.extraSettingsPaths = ["/run/keys/vault.hcl"];
165165 services.vault.storageBackend = "postgresql";
166166 users.users.vault.extraGroups = ["keys"];
167167- ]]></programlisting>
167167+ ```
168168 '';
169169 };
170170 };
···125125 type = with types; nullOr path;
126126 default = null;
127127 example = "/var/lib/vaultwarden.env";
128128- description = ''
129129- Additional environment file as defined in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
128128+ description = lib.mdDoc ''
129129+ Additional environment file as defined in {manpage}`systemd.exec(5)`.
130130131131- Secrets like <envar>ADMIN_TOKEN</envar> and <envar>SMTP_PASSWORD</envar>
131131+ Secrets like {env}`ADMIN_TOKEN` and {env}`SMTP_PASSWORD`
132132 may be passed to the service without adding them to the world-readable Nix store.
133133134134 Note that this file needs to be available on the host on which
135135- <literal>vaultwarden</literal> is running.
135135+ `vaultwarden` is running.
136136137137 As a concrete example, to make the Admin UI available
138138 (from which new users can be invited initially),
139139- the secret <envar>ADMIN_TOKEN</envar> needs to be defined as described
140140- <link xlink:href="https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page">here</link>.
141141- Setting <literal>environmentFile</literal> to <literal>/var/lib/vaultwarden.env</literal>
139139+ the secret {env}`ADMIN_TOKEN` needs to be defined as described
140140+ [here](https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page).
141141+ Setting `environmentFile` to `/var/lib/vaultwarden.env`
142142 and ensuring permissions with e.g.
143143- <literal>chown vaultwarden:vaultwarden /var/lib/vaultwarden.env</literal>
144144- (the <literal>vaultwarden</literal> user will only exist after activating with
145145- <literal>enable = true;</literal> before this), we can set the contents of the file to have
143143+ `chown vaultwarden:vaultwarden /var/lib/vaultwarden.env`
144144+ (the `vaultwarden` user will only exist after activating with
145145+ `enable = true;` before this), we can set the contents of the file to have
146146 contents such as:
147147148148-<programlisting>
149149-# Admin secret token, see
150150-# https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page
151151-ADMIN_TOKEN=...copy-paste a unique generated secret token here...
152152-</programlisting>
148148+ ```
149149+ # Admin secret token, see
150150+ # https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page
151151+ ADMIN_TOKEN=...copy-paste a unique generated secret token here...
152152+ ```
153153 '';
154154 };
155155
+5-5
nixos/modules/services/web-apps/discourse.nix
···5757 type = with lib.types; nullOr path;
5858 default = null;
5959 example = "/run/keys/secret_key_base";
6060- description = ''
6060+ description = lib.mdDoc ''
6161 The path to a file containing the
6262- <literal>secret_key_base</literal> secret.
6262+ `secret_key_base` secret.
63636464- Discourse uses <literal>secret_key_base</literal> to encrypt
6464+ Discourse uses `secret_key_base` to encrypt
6565 the cookie store, which contains session data, and to digest
6666 user auth tokens.
67676868 Needs to be a 64 byte long string of hexadecimal
6969 characters. You can generate one by running
70707171- <programlisting>
7171+ ```
7272 openssl rand -hex 64 >/path/to/secret_key_base_file
7373- </programlisting>
7373+ ```
74747575 This should be a string, not a nix path, since nix paths are
7676 copied into the world-readable nix store.
+7-7
nixos/modules/services/web-apps/hedgedoc.nix
···990990 type = with types; nullOr path;
991991 default = null;
992992 example = "/var/lib/hedgedoc/hedgedoc.env";
993993- description = ''
994994- Environment file as defined in <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
993993+ description = lib.mdDoc ''
994994+ Environment file as defined in {manpage}`systemd.exec(5)`.
995995996996 Secrets may be passed to the service without adding them to the world-readable
997997 Nix store, by specifying placeholder variables as the option value in Nix and
998998 setting these variables accordingly in the environment file.
99999910001000- <programlisting>
10001000+ ```
10011001 # snippet of HedgeDoc-related config
10021002 services.hedgedoc.configuration.dbURL = "postgres://hedgedoc:\''${DB_PASSWORD}@db-host:5432/hedgedocdb";
10031003 services.hedgedoc.configuration.minio.secretKey = "$MINIO_SECRET_KEY";
10041004- </programlisting>
10041004+ ```
1005100510061006- <programlisting>
10061006+ ```
10071007 # content of the environment file
10081008 DB_PASSWORD=verysecretdbpassword
10091009 MINIO_SECRET_KEY=verysecretminiokey
10101010- </programlisting>
10101010+ ```
1011101110121012 Note that this file needs to be available on the host on which
10131013- <literal>HedgeDoc</literal> is running.
10131013+ `HedgeDoc` is running.
10141014 '';
10151015 };
10161016
···3434 certPath = mkOption {
3535 type = types.path;
3636 example = "/var/lib/acme/example.com/cert.pem";
3737- description = ''
3737+ description = lib.mdDoc ''
3838 Path to TLS certificate. An ACME certificate and key may be
3939 shared with an HTTP server, but only if molly-brown has
4040 permissions allowing it to read such keys.
41414242 As an example:
4343- <programlisting>
4343+ ```
4444 systemd.services.molly-brown.serviceConfig.SupplementaryGroups =
4545 [ config.security.acme.certs."example.com".group ];
4646- </programlisting>
4646+ ```
4747 '';
4848 };
4949
+5-5
nixos/modules/system/activation/top-level.nix
···164164 specialisation = mkOption {
165165 default = {};
166166 example = lib.literalExpression "{ fewJobsManyCores.configuration = { nix.settings = { core = 0; max-jobs = 1; }; }; }";
167167- description = ''
167167+ description = lib.mdDoc ''
168168 Additional configurations to build. If
169169- <literal>inheritParentConfig</literal> is true, the system
169169+ `inheritParentConfig` is true, the system
170170 will be based on the overall system configuration.
171171172172 To switch to a specialised configuration
173173- (e.g. <literal>fewJobsManyCores</literal>) at runtime, run:
173173+ (e.g. `fewJobsManyCores`) at runtime, run:
174174175175- <programlisting>
175175+ ```
176176 sudo /run/current-system/specialisation/fewJobsManyCores/bin/switch-to-configuration test
177177- </programlisting>
177177+ ```
178178 '';
179179 type = types.attrsOf (types.submodule (
180180 local@{ ... }: let
+3-3
nixos/modules/virtualisation/lxcfs.nix
···1515 mkOption {
1616 type = types.bool;
1717 default = false;
1818- description = ''
1818+ description = lib.mdDoc ''
1919 This enables LXCFS, a FUSE filesystem for LXC.
2020 To use lxcfs in include the following configuration in your
2121 container configuration:
2222- <programlisting>
2222+ ```
2323 virtualisation.lxc.defaultConfig = "lxc.include = ''${pkgs.lxcfs}/share/lxc/config/common.conf.d/00-lxcfs.conf";
2424- </programlisting>
2424+ ```
2525 '';
2626 };
2727 };
+4-4
nixos/modules/virtualisation/lxd.nix
···1818 enable = mkOption {
1919 type = types.bool;
2020 default = false;
2121- description = ''
2121+ description = lib.mdDoc ''
2222 This option enables lxd, a daemon that manages
2323 containers. Users in the "lxd" group can interact with
2424 the daemon (e.g. to start or stop containers) using the
2525- <command>lxc</command> command line tool, among others.
2525+ {command}`lxc` command line tool, among others.
26262727 Most of the time, you'll also want to start lxcfs, so
2828 that containers can "see" the limits:
2929- <programlisting>
2929+ ```
3030 virtualisation.lxc.lxcfs.enable = true;
3131- </programlisting>
3131+ ```
3232 '';
3333 };
3434