diff options
author | Naïm Favier <n@monade.li> | 2022-12-21 22:00:27 +0100 |
---|---|---|
committer | Naïm Favier <n@monade.li> | 2022-12-27 17:23:25 +0100 |
commit | 07cb3bf3ccaff42789336a0a22c49ea4d25d309b (patch) | |
tree | 956cae8853f1242d589d53a0b4b977d5f4ad05c9 /nixos/doc/manual/from_md | |
parent | 3f6fed2e59d556a5cec475b14b7af54558e19f25 (diff) |
nixos/doc: bump Pandoc
Update the pinned channel in `md-to-db`, which bumps the Pandoc version,
which fixes https://github.com/NixOS/nixpkgs/issues/125511 maybe.
Diffstat (limited to 'nixos/doc/manual/from_md')
67 files changed, 291 insertions, 279 deletions
diff --git a/nixos/doc/manual/from_md/administration/cleaning-store.chapter.xml b/nixos/doc/manual/from_md/administration/cleaning-store.chapter.xml index 4243d2bf53f9..35dfaf30f457 100644 --- a/nixos/doc/manual/from_md/administration/cleaning-store.chapter.xml +++ b/nixos/doc/manual/from_md/administration/cleaning-store.chapter.xml @@ -23,7 +23,7 @@ $ nix-collect-garbage this unit automatically at certain points in time, for instance, every night at 03:15: </para> - <programlisting language="bash"> + <programlisting language="nix"> nix.gc.automatic = true; nix.gc.dates = "03:15"; </programlisting> diff --git a/nixos/doc/manual/from_md/administration/container-networking.section.xml b/nixos/doc/manual/from_md/administration/container-networking.section.xml index 788a2b7b0acb..a64053cdfa5e 100644 --- a/nixos/doc/manual/from_md/administration/container-networking.section.xml +++ b/nixos/doc/manual/from_md/administration/container-networking.section.xml @@ -31,7 +31,7 @@ $ ping -c1 10.233.4.2 address. This can be accomplished using the following configuration on the host: </para> - <programlisting language="bash"> + <programlisting language="nix"> networking.nat.enable = true; networking.nat.internalInterfaces = ["ve-+"]; networking.nat.externalInterface = "eth0"; @@ -45,7 +45,7 @@ networking.nat.externalInterface = "eth0"; If you are using Network Manager, you need to explicitly prevent it from managing container interfaces: </para> - <programlisting language="bash"> + <programlisting language="nix"> networking.networkmanager.unmanaged = [ "interface-name:ve-*" ]; </programlisting> <para> diff --git a/nixos/doc/manual/from_md/administration/control-groups.chapter.xml b/nixos/doc/manual/from_md/administration/control-groups.chapter.xml index 8dab2c9d44b4..f78c05878031 100644 --- a/nixos/doc/manual/from_md/administration/control-groups.chapter.xml +++ b/nixos/doc/manual/from_md/administration/control-groups.chapter.xml @@ -42,7 +42,7 @@ $ systemd-cgls process would get 1/1001 of the cgroup’s CPU time.) You can limit a service’s CPU share in <literal>configuration.nix</literal>: </para> - <programlisting language="bash"> + <programlisting language="nix"> systemd.services.httpd.serviceConfig.CPUShares = 512; </programlisting> <para> @@ -57,7 +57,7 @@ systemd.services.httpd.serviceConfig.CPUShares = 512; <literal>configuration.nix</literal>; for instance, to limit <literal>httpd.service</literal> to 512 MiB of RAM (excluding swap): </para> - <programlisting language="bash"> + <programlisting language="nix"> systemd.services.httpd.serviceConfig.MemoryLimit = "512M"; </programlisting> <para> diff --git a/nixos/doc/manual/from_md/administration/declarative-containers.section.xml b/nixos/doc/manual/from_md/administration/declarative-containers.section.xml index 4831c9c74e84..efc3432ba1a1 100644 --- a/nixos/doc/manual/from_md/administration/declarative-containers.section.xml +++ b/nixos/doc/manual/from_md/administration/declarative-containers.section.xml @@ -6,7 +6,7 @@ following specifies that there shall be a container named <literal>database</literal> running PostgreSQL: </para> - <programlisting language="bash"> + <programlisting language="nix"> containers.database = { config = { config, pkgs, ... }: @@ -29,7 +29,7 @@ containers.database = However, they cannot change the network configuration. You can give a container its own network as follows: </para> - <programlisting language="bash"> + <programlisting language="nix"> containers.database = { privateNetwork = true; hostAddress = "192.168.100.10"; diff --git a/nixos/doc/manual/from_md/administration/service-mgmt.chapter.xml b/nixos/doc/manual/from_md/administration/service-mgmt.chapter.xml index cb69184378bd..3b7bd6cd30cf 100644 --- a/nixos/doc/manual/from_md/administration/service-mgmt.chapter.xml +++ b/nixos/doc/manual/from_md/administration/service-mgmt.chapter.xml @@ -91,7 +91,7 @@ Jan 07 15:55:57 hagbard systemd[1]: Started PostgreSQL Server. In order to enable a systemd <emphasis>system</emphasis> service with provided upstream package, use (e.g): </para> - <programlisting language="bash"> + <programlisting language="nix"> systemd.packages = [ pkgs.packagekit ]; </programlisting> <para> diff --git a/nixos/doc/manual/from_md/configuration/abstractions.section.xml b/nixos/doc/manual/from_md/configuration/abstractions.section.xml index c71e23e34adf..469e85979e0f 100644 --- a/nixos/doc/manual/from_md/configuration/abstractions.section.xml +++ b/nixos/doc/manual/from_md/configuration/abstractions.section.xml @@ -4,7 +4,7 @@ If you find yourself repeating yourself over and over, it’s time to abstract. Take, for instance, this Apache HTTP Server configuration: </para> - <programlisting language="bash"> + <programlisting language="nix"> { services.httpd.virtualHosts = { "blog.example.org" = { @@ -29,7 +29,7 @@ the only difference is the document root directories. To prevent this duplication, we can use a <literal>let</literal>: </para> - <programlisting language="bash"> + <programlisting language="nix"> let commonConfig = { adminAddr = "alice@example.org"; @@ -55,7 +55,7 @@ in You can write a <literal>let</literal> wherever an expression is allowed. Thus, you also could have written: </para> - <programlisting language="bash"> + <programlisting language="nix"> { services.httpd.virtualHosts = let commonConfig = ...; in @@ -74,7 +74,7 @@ in of different virtual hosts, all with identical configuration except for the document root. This can be done as follows: </para> - <programlisting language="bash"> + <programlisting language="nix"> { services.httpd.virtualHosts = let diff --git a/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml b/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml index 035ee3122e15..516022dc16d2 100644 --- a/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml +++ b/nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml @@ -7,7 +7,7 @@ network configuration not covered by the existing NixOS modules. For instance, to statically configure an IPv6 address: </para> - <programlisting language="bash"> + <programlisting language="nix"> networking.localCommands = '' ip -6 addr add 2001:610:685:1::1/64 dev eth0 diff --git a/nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xml b/nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xml index 07f541666cbe..b1a1a8df3247 100644 --- a/nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xml +++ b/nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xml @@ -28,7 +28,7 @@ $ cd nixpkgs manual. Finally, you add it to <xref linkend="opt-environment.systemPackages" />, e.g. </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = [ pkgs.my-package ]; </programlisting> <para> @@ -45,7 +45,7 @@ environment.systemPackages = [ pkgs.my-package ]; Hello</link> package directly in <literal>configuration.nix</literal>: </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = let my-hello = with pkgs; stdenv.mkDerivation rec { @@ -62,13 +62,13 @@ environment.systemPackages = Of course, you can also move the definition of <literal>my-hello</literal> into a separate Nix expression, e.g. </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = [ (import ./my-hello.nix) ]; </programlisting> <para> where <literal>my-hello.nix</literal> contains: </para> - <programlisting language="bash"> + <programlisting language="nix"> with import <nixpkgs> {}; # bring all of Nixpkgs into scope stdenv.mkDerivation rec { @@ -98,7 +98,7 @@ Hello, world! need to install <literal>appimage-run</literal>: add to <literal>/etc/nixos/configuration.nix</literal> </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = [ pkgs.appimage-run ]; </programlisting> <para> diff --git a/nixos/doc/manual/from_md/configuration/config-file.section.xml b/nixos/doc/manual/from_md/configuration/config-file.section.xml index 9792116eb08d..f6c8f70cffc5 100644 --- a/nixos/doc/manual/from_md/configuration/config-file.section.xml +++ b/nixos/doc/manual/from_md/configuration/config-file.section.xml @@ -3,7 +3,7 @@ <para> The NixOS configuration file generally looks like this: </para> - <programlisting language="bash"> + <programlisting language="nix"> { config, pkgs, ... }: { option definitions @@ -21,7 +21,7 @@ the name of an option and <literal>value</literal> is its value. For example, </para> - <programlisting language="bash"> + <programlisting language="nix"> { config, pkgs, ... }: { services.httpd.enable = true; @@ -44,7 +44,7 @@ <literal>true</literal>. This means that the example above can also be written as: </para> - <programlisting language="bash"> + <programlisting language="nix"> { config, pkgs, ... }: { services = { @@ -96,7 +96,7 @@ The option value `services.httpd.enable' in `/etc/nixos/configuration.nix' is no <para> Strings are enclosed in double quotes, e.g. </para> - <programlisting language="bash"> + <programlisting language="nix"> networking.hostName = "dexter"; </programlisting> <para> @@ -107,7 +107,7 @@ networking.hostName = "dexter"; Multi-line strings can be enclosed in <emphasis>double single quotes</emphasis>, e.g. </para> - <programlisting language="bash"> + <programlisting language="nix"> networking.extraHosts = '' 127.0.0.2 other-localhost @@ -135,7 +135,7 @@ networking.extraHosts = These can be <literal>true</literal> or <literal>false</literal>, e.g. </para> - <programlisting language="bash"> + <programlisting language="nix"> networking.firewall.enable = true; networking.firewall.allowPing = false; </programlisting> @@ -149,7 +149,7 @@ networking.firewall.allowPing = false; <para> For example, </para> - <programlisting language="bash"> + <programlisting language="nix"> boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 60; </programlisting> <para> @@ -171,7 +171,7 @@ boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 60; Sets were introduced above. They are name/value pairs enclosed in braces, as in the option definition </para> - <programlisting language="bash"> + <programlisting language="nix"> fileSystems."/boot" = { device = "/dev/sda1"; fsType = "ext4"; @@ -189,13 +189,13 @@ fileSystems."/boot" = The important thing to note about lists is that list elements are separated by whitespace, like this: </para> - <programlisting language="bash"> + <programlisting language="nix"> boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ]; </programlisting> <para> List elements can be any other type, e.g. sets: </para> - <programlisting language="bash"> + <programlisting language="nix"> swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; </programlisting> </listitem> @@ -211,7 +211,7 @@ swapDevices = [ { device = "/dev/disk/by-label/swap"; } ]; through the function argument <literal>pkgs</literal>. Typical uses: </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = [ pkgs.thunderbird pkgs.emacs diff --git a/nixos/doc/manual/from_md/configuration/customizing-packages.section.xml b/nixos/doc/manual/from_md/configuration/customizing-packages.section.xml index f78b5dc5460c..8026c4102b48 100644 --- a/nixos/doc/manual/from_md/configuration/customizing-packages.section.xml +++ b/nixos/doc/manual/from_md/configuration/customizing-packages.section.xml @@ -22,7 +22,7 @@ a dependency on GTK 2. If you want to build it against GTK 3, you can specify that as follows: </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ]; </programlisting> <para> @@ -46,7 +46,7 @@ environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ]; the package, such as the source code. For instance, if you want to override the source code of Emacs, you can say: </para> - <programlisting language="bash"> + <programlisting language="nix"> environment.systemPackages = [ (pkgs.emacs.overrideAttrs (oldAttrs: { name = "emacs-25.0-pre"; @@ -72,7 +72,7 @@ environment.systemPackages = [ everything depend on your customised instance, you can apply a <emphasis>global& |