summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-06-17 12:01:51 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-06-17 12:28:26 +0200
commit11cb382a4c095656463117390baf5b03e029d8a2 (patch)
tree3c94cdfd94ba25a6fc8e54157908ab3b07277947
parent092c25ac08ad680b30d201c946aa978e3f23d007 (diff)
nixos/doc: Fix spurious indentation
-rw-r--r--doc/languages-frameworks/java.xml2
-rw-r--r--nixos/doc/manual/configuration/matrix.xml186
-rw-r--r--nixos/doc/manual/configuration/modularity.xml18
-rw-r--r--nixos/doc/manual/configuration/profiles.xml2
-rw-r--r--nixos/doc/manual/configuration/user-mgmt.xml2
-rw-r--r--nixos/doc/manual/configuration/xfce.xml10
-rw-r--r--nixos/doc/manual/development/writing-nixos-tests.xml14
-rw-r--r--nixos/doc/manual/installation/changing-config.xml23
-rw-r--r--nixos/doc/manual/installation/installing-from-other-distro.xml45
-rw-r--r--nixos/doc/manual/installation/installing.xml4
-rw-r--r--nixos/doc/manual/release-notes/rl-1703.xml16
-rw-r--r--nixos/modules/services/desktops/flatpak.xml22
-rw-r--r--nixos/modules/services/monitoring/prometheus/exporters.xml110
-rw-r--r--nixos/modules/services/network-filesystems/samba.nix8
-rw-r--r--nixos/modules/services/networking/dnscrypt-proxy.xml8
-rw-r--r--nixos/modules/services/networking/smokeping.nix22
-rw-r--r--nixos/modules/services/web-apps/matomo-doc.xml22
17 files changed, 260 insertions, 254 deletions
diff --git a/doc/languages-frameworks/java.xml b/doc/languages-frameworks/java.xml
index 667a795a8d3a..287f63e685c4 100644
--- a/doc/languages-frameworks/java.xml
+++ b/doc/languages-frameworks/java.xml
@@ -68,7 +68,7 @@ installPhase =
can be done in a generic fashion with the <literal>--set</literal> argument
of <literal>makeWrapper</literal>:
<programlisting>
- --set JAVA_HOME ${jdk.home}
+--set JAVA_HOME ${jdk.home}
</programlisting>
</para>
diff --git a/nixos/doc/manual/configuration/matrix.xml b/nixos/doc/manual/configuration/matrix.xml
index 66965460a15d..e43b70faf7ac 100644
--- a/nixos/doc/manual/configuration/matrix.xml
+++ b/nixos/doc/manual/configuration/matrix.xml
@@ -33,91 +33,91 @@
<link xlink:href="https://github.com/matrix-org/synapse#synapse-installation">
installation instructions of Synapse </link>.
<programlisting>
+let
+ fqdn =
let
- fqdn =
- let
- join = hostName: domain: hostName + optionalString (domain != null) ".${domain}";
- in join config.networking.hostName config.networking.domain;
- in {
- networking = {
- hostName = "myhostname";
- domain = "example.org";
- };
- networking.firewall.allowedTCPPorts = [ 80 443 ];
+ join = hostName: domain: hostName + optionalString (domain != null) ".${domain}";
+ in join config.networking.hostName config.networking.domain;
+in {
+ networking = {
+ hostName = "myhostname";
+ domain = "example.org";
+ };
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
- services.nginx = {
- enable = true;
- # only recommendedProxySettings and recommendedGzipSettings are strictly required,
- # but the rest make sense as well
- recommendedTlsSettings = true;
- recommendedOptimisation = true;
- recommendedGzipSettings = true;
- recommendedProxySettings = true;
+ services.nginx = {
+ enable = true;
+ # only recommendedProxySettings and recommendedGzipSettings are strictly required,
+ # but the rest make sense as well
+ recommendedTlsSettings = true;
+ recommendedOptimisation = true;
+ recommendedGzipSettings = true;
+ recommendedProxySettings = true;
- virtualHosts = {
- # This host section can be placed on a different host than the rest,
- # i.e. to delegate from the host being accessible as ${config.networking.domain}
- # to another host actually running the Matrix homeserver.
- "${config.networking.domain}" = {
- locations."= /.well-known/matrix/server".extraConfig =
- let
- # use 443 instead of the default 8448 port to unite
- # the client-server and server-server port for simplicity
- server = { "m.server" = "${fqdn}:443"; };
- in ''
- add_header Content-Type application/json;
- return 200 '${builtins.toJSON server}';
- '';
- locations."= /.well-known/matrix/client".extraConfig =
- let
- client = {
- "m.homeserver" = { "base_url" = "https://${fqdn}"; };
- "m.identity_server" = { "base_url" = "https://vector.im"; };
- };
- # ACAO required to allow riot-web on any URL to request this json file
- in ''
- add_header Content-Type application/json;
- add_header Access-Control-Allow-Origin *;
- return 200 '${builtins.toJSON client}';
- '';
- };
+ virtualHosts = {
+ # This host section can be placed on a different host than the rest,
+ # i.e. to delegate from the host being accessible as ${config.networking.domain}
+ # to another host actually running the Matrix homeserver.
+ "${config.networking.domain}" = {
+ locations."= /.well-known/matrix/server".extraConfig =
+ let
+ # use 443 instead of the default 8448 port to unite
+ # the client-server and server-server port for simplicity
+ server = { "m.server" = "${fqdn}:443"; };
+ in ''
+ add_header Content-Type application/json;
+ return 200 '${builtins.toJSON server}';
+ '';
+ locations."= /.well-known/matrix/client".extraConfig =
+ let
+ client = {
+ "m.homeserver" = { "base_url" = "https://${fqdn}"; };
+ "m.identity_server" = { "base_url" = "https://vector.im"; };
+ };
+ # ACAO required to allow riot-web on any URL to request this json file
+ in ''
+ add_header Content-Type application/json;
+ add_header Access-Control-Allow-Origin *;
+ return 200 '${builtins.toJSON client}';
+ '';
+ };
- # Reverse proxy for Matrix client-server and server-server communication
- ${fqdn} = {
- enableACME = true;
- forceSSL = true;
+ # Reverse proxy for Matrix client-server and server-server communication
+ ${fqdn} = {
+ enableACME = true;
+ forceSSL = true;
- # Or do a redirect instead of the 404, or whatever is appropriate for you.
- # But do not put a Matrix Web client here! See the Riot Web section below.
- locations."/".extraConfig = ''
- return 404;
- '';
+ # Or do a redirect instead of the 404, or whatever is appropriate for you.
+ # But do not put a Matrix Web client here! See the Riot Web section below.
+ locations."/".extraConfig = ''
+ return 404;
+ '';
- # forward all Matrix API calls to the synapse Matrix homeserver
- locations."/_matrix" = {
- proxyPass = "http://[::1]:8008";
- };
- };
+ # forward all Matrix API calls to the synapse Matrix homeserver
+ locations."/_matrix" = {
+ proxyPass = "http://[::1]:8008";
};
};
- services.matrix-synapse = {
- enable = true;
- server_name = config.networking.domain;
- listeners = [
- {
- port = 8008;
- bind_address = "::1";
- type = "http";
- tls = false;
- x_forwarded = true;
- resources = [
- { names = [ "client" "federation" ]; compress = false; }
- ];
- }
- ];
- };
};
- </programlisting>
+ };
+ services.matrix-synapse = {
+ enable = true;
+ server_name = config.networking.domain;
+ listeners = [
+ {
+ port = 8008;
+ bind_address = "::1";
+ type = "http";
+ tls = false;
+ x_forwarded = true;
+ resources = [
+ { names = [ "client" "federation" ]; compress = false; }
+ ];
+ }
+ ];
+ };
+};
+</programlisting>
</para>
<para>
@@ -142,14 +142,14 @@
create a new user or admin, run the following after you have set the secret
and have rebuilt NixOS:
<programlisting>
- $ nix run nixpkgs.matrix-synapse
- $ register_new_matrix_user -k &lt;your-registration-shared-secret&gt; http://localhost:8008
- New user localpart: &lt;your-username&gt;
- Password:
- Confirm password:
- Make admin [no]:
- Success!
- </programlisting>
+$ nix run nixpkgs.matrix-synapse
+$ register_new_matrix_user -k &lt;your-registration-shared-secret&gt; http://localhost:8008
+New user localpart: &lt;your-username&gt;
+Password:
+Confirm password:
+Make admin [no]:
+Success!
+</programlisting>
In the example, this would create a user with the Matrix Identifier
<literal>@your-username:example.org</literal>. Note that the registration
secret ends up in the nix store and therefore is world-readable by any user
@@ -177,16 +177,16 @@
Matrix Now!</link> for a list of existing clients and their supported
featureset.
<programlisting>
- services.nginx.virtualHosts."riot.${fqdn}" = {
- enableACME = true;
- forceSSL = true;
- serverAliases = [
- "riot.${config.networking.domain}"
- ];
+services.nginx.virtualHosts."riot.${fqdn}" = {
+ enableACME = true;
+ forceSSL = true;
+ serverAliases = [
+ "riot.${config.networking.domain}"
+ ];
- root = pkgs.riot-web;
- };
- </programlisting>
+ root = pkgs.riot-web;
+};
+</programlisting>
</para>
<para>
diff --git a/nixos/doc/manual/configuration/modularity.xml b/nixos/doc/manual/configuration/modularity.xml
index 724abd31ca4e..67bb5a47d729 100644
--- a/nixos/doc/manual/configuration/modularity.xml
+++ b/nixos/doc/manual/configuration/modularity.xml
@@ -129,17 +129,17 @@ nix-repl> map (x: x.hostName) config.<xref linkend="opt-services.httpd.virtualHo
While abstracting your configuration, you may find it useful to generate
modules using code, instead of writing files. The example below would have
the same effect as importing a file which sets those options.
-<screen>
- { config, pkgs, ... }:
+<programlisting>
+{ config, pkgs, ... }:
- let netConfig = { hostName }: {
- networking.hostName = hostName;
- networking.useDHCP = false;
- };
+let netConfig = { hostName }: {
+ networking.hostName = hostName;
+ networking.useDHCP = false;
+};
- in
+in
- { imports = [ (netConfig "nixos.localdomain") ]; }
- </screen>
+{ imports = [ (netConfig "nixos.localdomain") ]; }
+</programlisting>
</para>
</section>
diff --git a/nixos/doc/manual/configuration/profiles.xml b/nixos/doc/manual/configuration/profiles.xml
index c0a8f55785fc..9d08f7f7bed2 100644
--- a/nixos/doc/manual/configuration/profiles.xml
+++ b/nixos/doc/manual/configuration/profiles.xml
@@ -16,7 +16,7 @@
imports = [
&lt;nixpkgs/nixos/modules/profiles/profile-name.nix&gt;
];
- </programlisting>
+</programlisting>
<para>
Even if some of these profiles seem only useful in the context of install
media, many are actually intended to be used in real installs.
diff --git a/nixos/doc/manual/configuration/user-mgmt.xml b/nixos/doc/manual/configuration/user-mgmt.xml
index 66c1c6eb3a11..4b1710f3a2b1 100644
--- a/nixos/doc/manual/configuration/user-mgmt.xml
+++ b/nixos/doc/manual/configuration/user-mgmt.xml
@@ -44,7 +44,7 @@
A user ID (uid) is assigned automatically. You can also specify a uid
manually by adding
<programlisting>
- uid = 1000;
+uid = 1000;
</programlisting>
to the user specification.
</para>
diff --git a/nixos/doc/manual/configuration/xfce.xml b/nixos/doc/manual/configuration/xfce.xml
index 77d5d9632792..f2967fa3b10a 100644
--- a/nixos/doc/manual/configuration/xfce.xml
+++ b/nixos/doc/manual/configuration/xfce.xml
@@ -11,7 +11,7 @@
<link linkend="opt-services.xserver.desktopManager.xfce.enable">xfce.enable</link> = true;
<link linkend="opt-services.xserver.desktopManager.default">default</link> = "xfce";
};
- </programlisting>
+</programlisting>
</para>
<para>
Optionally, <emphasis>compton</emphasis> can be enabled for nice graphical
@@ -24,7 +24,7 @@
<link linkend="opt-services.compton.shadow">shadow</link> = true;
<link linkend="opt-services.compton.fadeDelta">fadeDelta</link> = 4;
};
- </programlisting>
+</programlisting>
</para>
<para>
Some Xfce programs are not installed automatically. To install them manually
@@ -37,7 +37,7 @@
To enable <emphasis>Thunar</emphasis> volume support, put
<programlisting>
<xref linkend="opt-services.xserver.desktopManager.xfce.enable"/> = true;
- </programlisting>
+</programlisting>
into your <emphasis>configuration.nix</emphasis>.
</para>
</simplesect>
@@ -58,14 +58,14 @@
on start (look at <command>journalctl --user -b</command>).
<programlisting>
Thunar:2410): GVFS-RemoteVolumeMonitor-WARNING **: remote volume monitor with dbus name org.gtk.Private.UDisks2VolumeMonitor is not supported
- </programlisting>
+</programlisting>
This is caused by some needed GNOME services not running. This is all fixed
by enabling "Launch GNOME services on startup" in the Advanced tab of the
Session and Startup settings panel. Alternatively, you can run this command
to do the same thing.
<programlisting>
$ xfconf-query -c xfce4-session -p /compat/LaunchGNOME -s true
- </programlisting>
+</programlisting>
A log-out and re-log will be needed for this to take effect.
</para>
</simplesect>
diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml
index 4a2615c9407b..6be2d0a4d231 100644
--- a/nixos/doc/manual/development/writing-nixos-tests.xml
+++ b/nixos/doc/manual/development/writing-nixos-tests.xml
@@ -397,9 +397,9 @@ startAll;
</para>
<para>
<programlisting>
- $machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
- $machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
- </programlisting>
+$machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager`
+$machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager`
+</programlisting>
</para>
</listitem>
</varlistentry>
@@ -410,10 +410,10 @@ startAll;
To test user units declared by <literal>systemd.user.services</literal> the
optional <literal>$user</literal> argument can be used:
<programlisting>
- $machine->start;
- $machine->waitForX;
- $machine->waitForUnit("xautolock.service", "x-session-user");
- </programlisting>
+$machine->start;
+$machine->waitForX;
+$machine->waitForUnit("xautolock.service", "x-session-user");
+</programlisting>
This applies to <literal>systemctl</literal>, <literal>getUnitInfo</literal>,
<literal>waitForUnit</literal>, <literal>startJob</literal> and
<literal>stopJob</literal>.
diff --git a/nixos/doc/manual/installation/changing-config.xml b/nixos/doc/manual/installation/changing-config.xml
index 1a116ec0b655..b77d71389a9d 100644
--- a/nixos/doc/manual/installation/changing-config.xml
+++ b/nixos/doc/manual/installation/changing-config.xml
@@ -9,7 +9,8 @@
<link linkend="ch-configuration">changed something</link> in that file, you
should do
<screen>
-# nixos-rebuild switch</screen>
+<prompt># </prompt>nixos-rebuild switch
+</screen>
to build the new configuration, make it the default configuration for
booting, and try to realise the configuration in the running system (e.g., by
restarting system services).
@@ -23,7 +24,8 @@
<para>
You can also do
<screen>
-# nixos-rebuild test</screen>
+<prompt># </prompt>nixos-rebuild test
+</screen>
to build the configuration and switch the running system to it, but without
making it the boot default. So if (say) the configuration locks up your
machine, you can just reboot to get back to a working configuration.
@@ -31,7 +33,8 @@
<para>
There is also
<screen>
-# nixos-rebuild boot</screen>
+<prompt># </prompt>nixos-rebuild boot
+</screen>
to build the configuration and make it the boot default, but not switch to it
now (so it will only take effect after the next reboot).
</para>
@@ -39,7 +42,8 @@
You can make your configuration show up in a different submenu of the GRUB 2
boot screen by giving it a different <emphasis>profile name</emphasis>, e.g.
<screen>
-# nixos-rebuild switch -p test </screen>
+<prompt># </prompt>nixos-rebuild switch -p test
+</screen>
which causes the new configuration (and previous ones created using
<literal>-p test</literal>) to show up in the GRUB submenu “NixOS - Profile
'test'”. This can be useful to separate test configurations from
@@ -48,7 +52,8 @@
<para>
Finally, you can do
<screen>
-$ nixos-rebuild build</screen>
+<prompt>$ </prompt>nixos-rebuild build
+</screen>
to build the configuration but nothing more. This is useful to see whether
everything compiles cleanly.
</para>
@@ -58,8 +63,8 @@ $ nixos-rebuild build</screen>
<emphasis>virtual machine</emphasis> that contains the desired configuration.
Just do
<screen>
-$ nixos-rebuild build-vm
-$ ./result/bin/run-*-vm
+<prompt>$ </prompt>nixos-rebuild build-vm
+<prompt>$ </prompt>./result/bin/run-*-vm
</screen>
The VM does not have any data from your host system, so your existing user
accounts and home directories will not be available unless you have set
@@ -74,12 +79,12 @@ $ ./result/bin/run-*-vm
guest. For instance, the following will forward host port 2222 to guest port
22 (SSH):
<screen>
-$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
+<prompt>$ </prompt>QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
</screen>
allowing you to log in via SSH (assuming you have set the appropriate
passwords or SSH authorized keys):
<screen>
-$ ssh -p 2222 localhost
+<prompt>$ </prompt>ssh -p 2222 localhost
</screen>
</para>
</chapter>
diff --git a/nixos/doc/manual/installation/installing-from-other-distro.xml b/nixos/doc/manual/installation/installing-from-other-distro.xml
index d1e49a2a1597..8ed45899fd7f 100644
--- a/nixos/doc/manual/installation/installing-from-other-distro.xml
+++ b/nixos/doc/manual/installation/installing-from-other-distro.xml
@@ -47,8 +47,8 @@
Short version:
</para>
<screen>
-$ curl https://nixos.org/nix/install | sh
-$ . $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen>
+<prompt>$ </prompt>curl https://nixos.org/nix/install | sh
+<prompt>$ </prompt>. $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen>
<para>
More details in the
<link
@@ -65,14 +65,14 @@ $ . $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen>
the <literal>nixpkgs</literal> channel by default.
</para>
<screen>
-$ nix-channel --list
+<prompt>$ </prompt>nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable</screen>
<para>
As that channel gets released without running the NixOS tests, it will be
safer to use the <literal>nixos-*</literal> channels instead:
</para>
<screen>
-$ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</replaceable> nixpkgs</screen>
+<prompt>$ </prompt>nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</replaceable> nixpkgs</screen>
<para>
You may want to throw in a <literal>nix-channel --update</literal> for good
measure.
@@ -89,7 +89,7 @@ $ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</repla
NixOS partition. They are installed by default on NixOS, but you don't have
NixOS yet..
</para>
-<screen>$ nix-env -iE "_: with import &lt;nixpkgs/nixos&gt; { configuration = {}; }; with config.system.build; [ nixos-generate-config nixos-install nixos-enter manual.manpages ]"</screen>
+<screen><prompt>$ </prompt>nix-env -iE "_: with import &lt;nixpkgs/nixos&gt; { configuration = {}; }; with config.system.build; [ nixos-generate-config nixos-install nixos-enter manual.manpages ]"</screen>
</listitem>
<listitem>
<note>
@@ -116,7 +116,7 @@ $ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</repla
<para>
Generate your NixOS configuration:
</para>
-<screen>$ sudo `which nixos-generate-config` --root /mnt</screen>
+<screen><prompt>$ </prompt>sudo `which nixos-generate-config` --root /mnt</screen>
<para>
You'll probably want to edit the configuration files. Refer to the
<literal>nixos-generate-config</literal> step in
@@ -148,8 +148,8 @@ $ nix-channel --add https://nixos.org/channels/nixos-<replaceable>version</repla
distribution:
</para>
<screen>
-$ sudo groupadd -g 30000 nixbld
-$ sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
+<prompt>$ </prompt>sudo groupadd -g 30000 nixbld
+<prompt>$ </prompt>sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
</listitem>
<listitem>
<para>
@@ -161,7 +161,7 @@ $ sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
existing systems without the help of a rescue USB drive or similar.
</para>
</warning>
-<screen>$ sudo PATH="$PATH" NIX_PATH="$NIX_PATH" `which nixos-install` --root /mnt</screen>
+<screen><prompt>$ </prompt>sudo PATH="$PATH" NIX_PATH="$NIX_PATH" `which nixos-install` --root /mnt</screen>
<para>
Again, please refer to the <literal>nixos-install</literal> step in
<xref linkend="sec-installation" /> for more information.
@@ -175,8 +175,8 @@ $ sudo useradd -u 30000 -g nixbld -G nixbld nixbld</screen>
Optionally, you may want to clean up your non-NixOS distribution:
</para>
<screen>
-$ sudo userdel nixbld
-$ sudo groupdel nixbld</screen>
+<prompt>$ </prompt>sudo userdel nixbld
+<prompt>$ </prompt>sudo groupdel nixbld</screen>
<para>
If you do not wish to keep the Nix package manager installed either, run
something like <literal>sudo rm -rv ~/.nix-* /nix</literal> and remove the
@@ -193,7 +193,7 @@ $ sudo groupdel nixbld</screen>
<para>
Generate your NixOS configuration:
</para>
-<screen>$ sudo `which nixos-generate-config` --root /</screen>
+<screen><prompt>$ </prompt>sudo `which nixos-generate-config` --root /</screen>
<para>
Note that this will place the generated configuration files in
<literal>/etc/nixos</literal>. You'll probably want to edit the
@@ -212,21 +212,21 @@ $ sudo groupdel nixbld</screen>
</para>
<programlisting>
<link linkend="opt-users.users._name__.initialHashedPassword">users.users.root.initialHashedPassword</link> = "";
- </programlisting>
+</programlisting>
</listitem>
<listitem>
<para>
Build the NixOS closure and install it in the <literal>system</literal>
profile:
</para>
-<screen>$ nix-env -p /nix/var/nix/profiles/system -f '&lt;nixpkgs/nixos&gt;' -I nixos-config=/etc/nixos/configuration.nix -iA system</screen>
+<screen><prompt>$ </prompt>nix-env -p /nix/var/nix/profiles/system -f '&lt;nixpkgs/nixos&gt;' -I nixos-config=/etc/nixos/configuration.nix -iA system</screen>
</listitem>
<listitem>
<para>
Change ownership of the <literal>/nix</literal> tree to root (since your
Nix install was probably single user):
</para>
-<screen>$ sudo chown -R 0.0 /nix</screen>
+<screen><prompt>$ </prompt>sudo chown -R 0.0 /nix</screen>
</listitem>
<listitem>
<para>
@@ -284,16 +284,16 @@ $ sudo groupdel nixbld</screen>
Let's create the files:
</para>
<screen>
-$ sudo touch /etc/NIXOS
-$ sudo touch /etc/NIXOS_LUSTRATE
- </screen>
+<prompt>$ </prompt>sudo touch /etc/NIXOS
+<prompt>$ </prompt>sudo touch /etc/NIXOS_LUSTRATE
+</screen>
<para>
Let's also make sure the NixOS configuration files are kept once we reboot
on NixOS:
</para>
<screen>
-$ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
- </screen>
+<prompt>$ </prompt>echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
+</screen>
</listitem>
<listitem>
<para>
@@ -312,8 +312,9 @@ $ echo etc/nixos | sudo tee -a /etc/NIXOS_LUSTRATE
</para>
</warning>
<screen>
-$ sudo mv -v /boot /boot.bak &amp;&amp;
- sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot</screen>
+<prompt>$ </prompt>sudo mv -v /boot /boot.bak &amp;&amp;
+sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot
+</screen>
<para>
Cross your fingers, reboot, hopefully you should get a NixOS prompt!
</para>
diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml
index 9687c21a01e6..cc5420794aff 100644
--- a/nixos/doc/manual/installation/installing.xml
+++ b/nixos/doc/manual/installation/installing.xml
@@ -525,7 +525,7 @@ $ nix-env -i w3m</screen>
<example xml:id='ex-config'>
<title>NixOS Configuration</title>
-<screen>
+<programlisting>
{ config, pkgs, ... }: {
imports = [
# Include the results of the hardware scan.
@@ -543,7 +543,7 @@ $ nix-env -i w3m</screen>
# Enable the OpenSSH server.
services.sshd.enable = true;
}
- </screen>
+</programlisting>
</example>
</section>
<section xml:id="sec-installation-additional-notes">
diff --git a/nixos/doc/manual/release-notes/rl-1703.xml b/nixos/doc/manual/release-notes/rl-1703.xml
index 6ca79e2bc00d..86f4a1ccfb78 100644
--- a/nixos/doc/manual/release-notes/rl-1703.xml
+++ b/nixos/doc/manual/release-notes/rl-1703.xml
@@ -626,17 +626,17 @@
xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install">
overlays</link>. For example, the following code:
<programlisting>
- let
- pkgs = import &lt;nixpkgs&gt; {};
- in
- pkgs.overridePackages (self: super: ...)
+let
+ pkgs = import &lt;nixpkgs&gt; {};
+in
+ pkgs.overridePackages (self: super: ...)
</programlisting>
should be replaced by:
<programlisting>
- let
- pkgs = import &lt;nixpkgs&gt; {};
- in
- import pkgs.path { overlays = [(self: super: ...)]; }
+let
+ pkgs = import &lt;nixpkgs&gt; {};
+in
+ import pkgs.path { overlays = [(self: super: ...)]; }
</programlisting>
</para>
</listitem>
diff --git a/nixos/modules/services/desktops/flatpak.xml b/nixos/modules/services/desktops/flatpak.xml
index 8045d5fa14f8..fb27bd1f62b2 100644
--- a/nixos/modules/services/desktops/flatpak.xml
+++ b/nixos/modules/services/desktops/flatpak.xml
@@ -21,7 +21,7 @@
<filename>configuration.nix</filename>:
<programlisting>
<xref linkend="opt-services.flatpak.enable"/> = true;
- </programlisting>
+</programlisting>
</para>
<para>
For the sandboxed apps to work correctly, desktop integration portals need to
@@ -30,27 +30,27 @@
<filename>configuration.nix</filename>:
<programlisting>
<xref linkend="opt-services.flatpak.extraPortals"/> = [ pkgs.xdg-desktop-portal-gtk ];
- </programlisting>
+</programlisting>
</para>
<para>
Then, you will need to add a repository, for example,
<link xlink:href="https://github.com/flatpak/flatpak/wiki">Flathub</link>,
either using the following commands:
-<programlisting>
- flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- flatpak update
- </programlisting>
+<screen>
+<prompt>$ </prompt>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
+<prompt>$ </prompt>flatpak update
+</screen>
or by opening the
<link xlink:href="https://flathub.org/repo/flathub.flatpakrepo">repository
file</link> in GNOME Software.
</para>
<para>
Finally, you can search and install programs:
-<programlisting>
- flatpak search bustle
- flatpak install flathub org.freedesktop.Bustle
- flatpak run org.freedesktop.Bustle
- </programlisting>
+<screen>
+<prompt>$ </prompt>flatpak search bustle
+<prompt>$ </prompt>flatpak install flathub org.freedesktop.Bustle
+<prompt>$ </prompt>flatpak run org.freedesktop.Bustle
+</screen>
Again, GNOME Software offers graphical interface for these tasks.
</para>
</chapter>
diff --git a/nixos/modules/services/monitoring/prometheus/exporters.xml b/nixos/modules/services/monitoring/prometheus/exporters.xml
index 7a0a1bdf2c14..81ac998729be 100644
--- a/nixos/modules/services/monitoring/prometheus/exporters.xml
+++ b/nixos/modules/services/monitoring/prometheus/exporters.xml
@@ -112,65 +112,65 @@
directory, which will be called postfix.nix and contains all exporter
specific options and configuration:
<programlisting>
- # nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
- { config, lib, pkgs }:
+# nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix
+{ config, lib, pkgs }:
- with lib;
+with lib;
- let
- # for convenience we define cfg here
- cfg = config.services.prometheus.exporters.postfix;
- in
- {
- port = 9154; # The postfix exporter listens on this port by default
+let
+ # for convenience we define cfg here
+ cfg = config.services.prometheus.exporters.postfix;
+in
+{
+ port = 9154; # The postfix exporter listens on this port by default
- # `extraOpts` is an attribute set which contains additional options
- # (and optional overrides for default options).
- # Note that this attribute is optional.
- extraOpts = {
- telemetryPath = mkOption {
- type = types.str;
- default = "/metrics";
- description = ''
- Path under which to expose metrics.
- '';