Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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.

+292 -280
+1 -1
nixos/doc/manual/from_md/administration/cleaning-store.chapter.xml
··· 23 23 this unit automatically at certain points in time, for instance, 24 24 every night at 03:15: 25 25 </para> 26 - <programlisting language="bash"> 26 + <programlisting language="nix"> 27 27 nix.gc.automatic = true; 28 28 nix.gc.dates = &quot;03:15&quot;; 29 29 </programlisting>
+2 -2
nixos/doc/manual/from_md/administration/container-networking.section.xml
··· 31 31 address. This can be accomplished using the following configuration 32 32 on the host: 33 33 </para> 34 - <programlisting language="bash"> 34 + <programlisting language="nix"> 35 35 networking.nat.enable = true; 36 36 networking.nat.internalInterfaces = [&quot;ve-+&quot;]; 37 37 networking.nat.externalInterface = &quot;eth0&quot;; ··· 45 45 If you are using Network Manager, you need to explicitly prevent it 46 46 from managing container interfaces: 47 47 </para> 48 - <programlisting language="bash"> 48 + <programlisting language="nix"> 49 49 networking.networkmanager.unmanaged = [ &quot;interface-name:ve-*&quot; ]; 50 50 </programlisting> 51 51 <para>
+2 -2
nixos/doc/manual/from_md/administration/control-groups.chapter.xml
··· 42 42 process would get 1/1001 of the cgroup’s CPU time.) You can limit a 43 43 service’s CPU share in <literal>configuration.nix</literal>: 44 44 </para> 45 - <programlisting language="bash"> 45 + <programlisting language="nix"> 46 46 systemd.services.httpd.serviceConfig.CPUShares = 512; 47 47 </programlisting> 48 48 <para> ··· 57 57 <literal>configuration.nix</literal>; for instance, to limit 58 58 <literal>httpd.service</literal> to 512 MiB of RAM (excluding swap): 59 59 </para> 60 - <programlisting language="bash"> 60 + <programlisting language="nix"> 61 61 systemd.services.httpd.serviceConfig.MemoryLimit = &quot;512M&quot;; 62 62 </programlisting> 63 63 <para>
+2 -2
nixos/doc/manual/from_md/administration/declarative-containers.section.xml
··· 6 6 following specifies that there shall be a container named 7 7 <literal>database</literal> running PostgreSQL: 8 8 </para> 9 - <programlisting language="bash"> 9 + <programlisting language="nix"> 10 10 containers.database = 11 11 { config = 12 12 { config, pkgs, ... }: ··· 29 29 However, they cannot change the network configuration. You can give 30 30 a container its own network as follows: 31 31 </para> 32 - <programlisting language="bash"> 32 + <programlisting language="nix"> 33 33 containers.database = { 34 34 privateNetwork = true; 35 35 hostAddress = &quot;192.168.100.10&quot;;
+1 -1
nixos/doc/manual/from_md/administration/service-mgmt.chapter.xml
··· 91 91 In order to enable a systemd <emphasis>system</emphasis> service 92 92 with provided upstream package, use (e.g): 93 93 </para> 94 - <programlisting language="bash"> 94 + <programlisting language="nix"> 95 95 systemd.packages = [ pkgs.packagekit ]; 96 96 </programlisting> 97 97 <para>
+4 -4
nixos/doc/manual/from_md/configuration/abstractions.section.xml
··· 4 4 If you find yourself repeating yourself over and over, it’s time to 5 5 abstract. Take, for instance, this Apache HTTP Server configuration: 6 6 </para> 7 - <programlisting language="bash"> 7 + <programlisting language="nix"> 8 8 { 9 9 services.httpd.virtualHosts = 10 10 { &quot;blog.example.org&quot; = { ··· 29 29 the only difference is the document root directories. To prevent 30 30 this duplication, we can use a <literal>let</literal>: 31 31 </para> 32 - <programlisting language="bash"> 32 + <programlisting language="nix"> 33 33 let 34 34 commonConfig = 35 35 { adminAddr = &quot;alice@example.org&quot;; ··· 55 55 You can write a <literal>let</literal> wherever an expression is 56 56 allowed. Thus, you also could have written: 57 57 </para> 58 - <programlisting language="bash"> 58 + <programlisting language="nix"> 59 59 { 60 60 services.httpd.virtualHosts = 61 61 let commonConfig = ...; in ··· 74 74 of different virtual hosts, all with identical configuration except 75 75 for the document root. This can be done as follows: 76 76 </para> 77 - <programlisting language="bash"> 77 + <programlisting language="nix"> 78 78 { 79 79 services.httpd.virtualHosts = 80 80 let
+1 -1
nixos/doc/manual/from_md/configuration/ad-hoc-network-config.section.xml
··· 7 7 network configuration not covered by the existing NixOS modules. For 8 8 instance, to statically configure an IPv6 address: 9 9 </para> 10 - <programlisting language="bash"> 10 + <programlisting language="nix"> 11 11 networking.localCommands = 12 12 '' 13 13 ip -6 addr add 2001:610:685:1::1/64 dev eth0
+5 -5
nixos/doc/manual/from_md/configuration/adding-custom-packages.section.xml
··· 28 28 manual. Finally, you add it to 29 29 <xref linkend="opt-environment.systemPackages" />, e.g. 30 30 </para> 31 - <programlisting language="bash"> 31 + <programlisting language="nix"> 32 32 environment.systemPackages = [ pkgs.my-package ]; 33 33 </programlisting> 34 34 <para> ··· 45 45 Hello</link> package directly in 46 46 <literal>configuration.nix</literal>: 47 47 </para> 48 - <programlisting language="bash"> 48 + <programlisting language="nix"> 49 49 environment.systemPackages = 50 50 let 51 51 my-hello = with pkgs; stdenv.mkDerivation rec { ··· 62 62 Of course, you can also move the definition of 63 63 <literal>my-hello</literal> into a separate Nix expression, e.g. 64 64 </para> 65 - <programlisting language="bash"> 65 + <programlisting language="nix"> 66 66 environment.systemPackages = [ (import ./my-hello.nix) ]; 67 67 </programlisting> 68 68 <para> 69 69 where <literal>my-hello.nix</literal> contains: 70 70 </para> 71 - <programlisting language="bash"> 71 + <programlisting language="nix"> 72 72 with import &lt;nixpkgs&gt; {}; # bring all of Nixpkgs into scope 73 73 74 74 stdenv.mkDerivation rec { ··· 98 98 need to install <literal>appimage-run</literal>: add to 99 99 <literal>/etc/nixos/configuration.nix</literal> 100 100 </para> 101 - <programlisting language="bash"> 101 + <programlisting language="nix"> 102 102 environment.systemPackages = [ pkgs.appimage-run ]; 103 103 </programlisting> 104 104 <para>
+11 -11
nixos/doc/manual/from_md/configuration/config-file.section.xml
··· 3 3 <para> 4 4 The NixOS configuration file generally looks like this: 5 5 </para> 6 - <programlisting language="bash"> 6 + <programlisting language="nix"> 7 7 { config, pkgs, ... }: 8 8 9 9 { option definitions ··· 21 21 the name of an option and <literal>value</literal> is its value. For 22 22 example, 23 23 </para> 24 - <programlisting language="bash"> 24 + <programlisting language="nix"> 25 25 { config, pkgs, ... }: 26 26 27 27 { services.httpd.enable = true; ··· 44 44 <literal>true</literal>. This means that the example above can also 45 45 be written as: 46 46 </para> 47 - <programlisting language="bash"> 47 + <programlisting language="nix"> 48 48 { config, pkgs, ... }: 49 49 50 50 { services = { ··· 96 96 <para> 97 97 Strings are enclosed in double quotes, e.g. 98 98 </para> 99 - <programlisting language="bash"> 99 + <programlisting language="nix"> 100 100 networking.hostName = &quot;dexter&quot;; 101 101 </programlisting> 102 102 <para> ··· 107 107 Multi-line strings can be enclosed in <emphasis>double single 108 108 quotes</emphasis>, e.g. 109 109 </para> 110 - <programlisting language="bash"> 110 + <programlisting language="nix"> 111 111 networking.extraHosts = 112 112 '' 113 113 127.0.0.2 other-localhost ··· 135 135 These can be <literal>true</literal> or 136 136 <literal>false</literal>, e.g. 137 137 </para> 138 - <programlisting language="bash"> 138 + <programlisting language="nix"> 139 139 networking.firewall.enable = true; 140 140 networking.firewall.allowPing = false; 141 141 </programlisting> ··· 149 149 <para> 150 150 For example, 151 151 </para> 152 - <programlisting language="bash"> 152 + <programlisting language="nix"> 153 153 boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 60; 154 154 </programlisting> 155 155 <para> ··· 171 171 Sets were introduced above. They are name/value pairs enclosed 172 172 in braces, as in the option definition 173 173 </para> 174 - <programlisting language="bash"> 174 + <programlisting language="nix"> 175 175 fileSystems.&quot;/boot&quot; = 176 176 { device = &quot;/dev/sda1&quot;; 177 177 fsType = &quot;ext4&quot;; ··· 189 189 The important thing to note about lists is that list elements 190 190 are separated by whitespace, like this: 191 191 </para> 192 - <programlisting language="bash"> 192 + <programlisting language="nix"> 193 193 boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quot; ]; 194 194 </programlisting> 195 195 <para> 196 196 List elements can be any other type, e.g. sets: 197 197 </para> 198 - <programlisting language="bash"> 198 + <programlisting language="nix"> 199 199 swapDevices = [ { device = &quot;/dev/disk/by-label/swap&quot;; } ]; 200 200 </programlisting> 201 201 </listitem> ··· 211 211 through the function argument <literal>pkgs</literal>. Typical 212 212 uses: 213 213 </para> 214 - <programlisting language="bash"> 214 + <programlisting language="nix"> 215 215 environment.systemPackages = 216 216 [ pkgs.thunderbird 217 217 pkgs.emacs
+3 -3
nixos/doc/manual/from_md/configuration/customizing-packages.section.xml
··· 22 22 a dependency on GTK 2. If you want to build it against GTK 3, you 23 23 can specify that as follows: 24 24 </para> 25 - <programlisting language="bash"> 25 + <programlisting language="nix"> 26 26 environment.systemPackages = [ (pkgs.emacs.override { gtk = pkgs.gtk3; }) ]; 27 27 </programlisting> 28 28 <para> ··· 46 46 the package, such as the source code. For instance, if you want to 47 47 override the source code of Emacs, you can say: 48 48 </para> 49 - <programlisting language="bash"> 49 + <programlisting language="nix"> 50 50 environment.systemPackages = [ 51 51 (pkgs.emacs.overrideAttrs (oldAttrs: { 52 52 name = &quot;emacs-25.0-pre&quot;; ··· 72 72 everything depend on your customised instance, you can apply a 73 73 <emphasis>global</emphasis> override as follows: 74 74 </para> 75 - <programlisting language="bash"> 75 + <programlisting language="nix"> 76 76 nixpkgs.config.packageOverrides = pkgs: 77 77 { emacs = pkgs.emacs.override { gtk = pkgs.gtk3; }; 78 78 };
+1 -1
nixos/doc/manual/from_md/configuration/declarative-packages.section.xml
··· 7 7 adding the following line to <literal>configuration.nix</literal> 8 8 enables the Mozilla Thunderbird email application: 9 9 </para> 10 - <programlisting language="bash"> 10 + <programlisting language="nix"> 11 11 environment.systemPackages = [ pkgs.thunderbird ]; 12 12 </programlisting> 13 13 <para>
+1 -1
nixos/doc/manual/from_md/configuration/file-systems.chapter.xml
··· 7 7 <literal>/dev/disk/by-label/data</literal> onto the mount point 8 8 <literal>/data</literal>: 9 9 </para> 10 - <programlisting language="bash"> 10 + <programlisting language="nix"> 11 11 fileSystems.&quot;/data&quot; = 12 12 { device = &quot;/dev/disk/by-label/data&quot;; 13 13 fsType = &quot;ext4&quot;;
+3 -3
nixos/doc/manual/from_md/configuration/firewall.section.xml
··· 6 6 both IPv4 and IPv6 traffic. It is enabled by default. It can be 7 7 disabled as follows: 8 8 </para> 9 - <programlisting language="bash"> 9 + <programlisting language="nix"> 10 10 networking.firewall.enable = false; 11 11 </programlisting> 12 12 <para> 13 13 If the firewall is enabled, you can open specific TCP ports to the 14 14 outside world: 15 15 </para> 16 - <programlisting language="bash"> 16 + <programlisting language="nix"> 17 17 networking.firewall.allowedTCPPorts = [ 80 443 ]; 18 18 </programlisting> 19 19 <para> ··· 26 26 <para> 27 27 To open ranges of TCP ports: 28 28 </para> 29 - <programlisting language="bash"> 29 + <programlisting language="nix"> 30 30 networking.firewall.allowedTCPPortRanges = [ 31 31 { from = 4000; to = 4007; } 32 32 { from = 8000; to = 8010; }
+5 -5
nixos/doc/manual/from_md/configuration/gpu-accel.chapter.xml
··· 62 62 <xref linkend="opt-hardware.opengl.extraPackages" /> enables 63 63 OpenCL support: 64 64 </para> 65 - <programlisting language="bash"> 65 + <programlisting language="nix"> 66 66 hardware.opengl.extraPackages = [ 67 67 rocm-opencl-icd 68 68 ]; ··· 85 85 enable OpenCL support. For example, for Gen8 and later GPUs, the 86 86 following configuration can be used: 87 87 </para> 88 - <programlisting language="bash"> 88 + <programlisting language="nix"> 89 89 hardware.opengl.extraPackages = [ 90 90 intel-compute-runtime 91 91 ]; ··· 162 162 makes amdvlk the default driver and hides radv and lavapipe from 163 163 the device list. A specific driver can be forced as follows: 164 164 </para> 165 - <programlisting language="bash"> 165 + <programlisting language="nix"> 166 166 hardware.opengl.extraPackages = [ 167 167 pkgs.amdvlk 168 168 ]; ··· 206 206 Modern Intel GPUs use the iHD driver, which can be installed 207 207 with: 208 208 </para> 209 - <programlisting language="bash"> 209 + <programlisting language="nix"> 210 210 hardware.opengl.extraPackages = [ 211 211 intel-media-driver 212 212 ]; ··· 215 215 Older Intel GPUs use the i965 driver, which can be installed 216 216 with: 217 217 </para> 218 - <programlisting language="bash"> 218 + <programlisting language="nix"> 219 219 hardware.opengl.extraPackages = [ 220 220 vaapiIntel 221 221 ];
+3 -3
nixos/doc/manual/from_md/configuration/ipv4-config.section.xml
··· 6 6 interfaces. However, you can configure an interface manually as 7 7 follows: 8 8 </para> 9 - <programlisting language="bash"> 9 + <programlisting language="nix"> 10 10 networking.interfaces.eth0.ipv4.addresses = [ { 11 11 address = &quot;192.168.1.2&quot;; 12 12 prefixLength = 24; ··· 16 16 Typically you’ll also want to set a default gateway and set of name 17 17 servers: 18 18 </para> 19 - <programlisting language="bash"> 19 + <programlisting language="nix"> 20 20 networking.defaultGateway = &quot;192.168.1.1&quot;; 21 21 networking.nameservers = [ &quot;8.8.8.8&quot; ]; 22 22 </programlisting> ··· 32 32 The host name is set using 33 33 <xref linkend="opt-networking.hostName" />: 34 34 </para> 35 - <programlisting language="bash"> 35 + <programlisting language="nix"> 36 36 networking.hostName = &quot;cartman&quot;; 37 37 </programlisting> 38 38 <para>
+4 -4
nixos/doc/manual/from_md/configuration/ipv6-config.section.xml
··· 10 10 <xref linkend="opt-networking.interfaces._name_.tempAddress" />. You 11 11 can disable IPv6 support globally by setting: 12 12 </para> 13 - <programlisting language="bash"> 13 + <programlisting language="nix"> 14 14 networking.enableIPv6 = false; 15 15 </programlisting> 16 16 <para> 17 17 You can disable IPv6 on a single interface using a normal sysctl (in 18 18 this example, we use interface <literal>eth0</literal>): 19 19 </para> 20 - <programlisting language="bash"> 20 + <programlisting language="nix"> 21 21 boot.kernel.sysctl.&quot;net.ipv6.conf.eth0.disable_ipv6&quot; = true; 22 22 </programlisting> 23 23 <para> 24 24 As with IPv4 networking interfaces are automatically configured via 25 25 DHCPv6. You can configure an interface manually: 26 26 </para> 27 - <programlisting language="bash"> 27 + <programlisting language="nix"> 28 28 networking.interfaces.eth0.ipv6.addresses = [ { 29 29 address = &quot;fe00:aa:bb:cc::2&quot;; 30 30 prefixLength = 64; ··· 34 34 For configuring a gateway, optionally with explicitly specified 35 35 interface: 36 36 </para> 37 - <programlisting language="bash"> 37 + <programlisting language="nix"> 38 38 networking.defaultGateway6 = { 39 39 address = &quot;fe00::1&quot;; 40 40 interface = &quot;enp0s3&quot;;
+4 -4
nixos/doc/manual/from_md/configuration/kubernetes.chapter.xml
··· 10 10 way is to enable and configure cluster components appropriately by 11 11 hand: 12 12 </para> 13 - <programlisting language="bash"> 13 + <programlisting language="nix"> 14 14 services.kubernetes = { 15 15 apiserver.enable = true; 16 16 controllerManager.enable = true; ··· 25 25 <quote>node</quote>) to the host. This enables apiserver, 26 26 controllerManager, scheduler, addonManager, kube-proxy and etcd: 27 27 </para> 28 - <programlisting language="bash"> 28 + <programlisting language="nix"> 29 29 services.kubernetes.roles = [ &quot;master&quot; ]; 30 30 </programlisting> 31 31 <para> 32 32 While this will enable the kubelet and kube-proxy only: 33 33 </para> 34 - <programlisting language="bash"> 34 + <programlisting language="nix"> 35 35 services.kubernetes.roles = [ &quot;node&quot; ]; 36 36 </programlisting> 37 37 <para> 38 38 Assigning both the master and node roles is usable if you want a 39 39 single node Kubernetes cluster for dev or testing purposes: 40 40 </para> 41 - <programlisting language="bash"> 41 + <programlisting language="nix"> 42 42 services.kubernetes.roles = [ &quot;master&quot; &quot;node&quot; ]; 43 43 </programlisting> 44 44 <para>
+9 -9
nixos/doc/manual/from_md/configuration/linux-kernel.chapter.xml
··· 5 5 option <literal>boot.kernelPackages</literal>. For instance, this 6 6 selects the Linux 3.10 kernel: 7 7 </para> 8 - <programlisting language="bash"> 8 + <programlisting language="nix"> 9 9 boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10; 10 10 </programlisting> 11 11 <para> ··· 48 48 <xref linkend="sec-customising-packages" />). For instance, to 49 49 enable support for the kernel debugger KGDB: 50 50 </para> 51 - <programlisting language="bash"> 51 + <programlisting language="nix"> 52 52 nixpkgs.config.packageOverrides = pkgs: pkgs.lib.recursiveUpdate pkgs { 53 53 linuxKernel.kernels.linux_5_10 = pkgs.linuxKernel.kernels.linux_5_10.override { 54 54 extraConfig = '' ··· 69 69 automatically by <literal>udev</literal>. You can force a module to 70 70 be loaded via <xref linkend="opt-boot.kernelModules" />, e.g. 71 71 </para> 72 - <programlisting language="bash"> 72 + <programlisting language="nix"> 73 73 boot.kernelModules = [ &quot;fuse&quot; &quot;kvm-intel&quot; &quot;coretemp&quot; ]; 74 74 </programlisting> 75 75 <para> ··· 77 77 root file system), you can use 78 78 <xref linkend="opt-boot.initrd.kernelModules" />: 79 79 </para> 80 - <programlisting language="bash"> 80 + <programlisting language="nix"> 81 81 boot.initrd.kernelModules = [ &quot;cifs&quot; ]; 82 82 </programlisting> 83 83 <para> ··· 88 88 Kernel runtime parameters can be set through 89 89 <xref linkend="opt-boot.kernel.sysctl" />, e.g. 90 90 </para> 91 - <programlisting language="bash"> 91 + <programlisting language="nix"> 92 92 boot.kernel.sysctl.&quot;net.ipv4.tcp_keepalive_time&quot; = 120; 93 93 </programlisting> 94 94 <para> ··· 101 101 You can customize the default kernel configuration by overriding 102 102 the arguments for your kernel package: 103 103 </para> 104 - <programlisting language="bash"> 104 + <programlisting language="nix"> 105 105 pkgs.linux_latest.override { 106 106 ignoreConfigErrors = true; 107 107 autoModules = false; ··· 126 126 <para> 127 127 To use your custom kernel package in your NixOS configuration, set 128 128 </para> 129 - <programlisting language="bash"> 129 + <programlisting language="nix"> 130 130 boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel; 131 131 </programlisting> 132 132 <para> ··· 139 139 a kernel that uses it with 140 140 <literal>pkgs.linuxManualConfig</literal>: 141 141 </para> 142 - <programlisting language="bash"> 142 + <programlisting language="nix"> 143 143 let 144 144 baseKernel = pkgs.linux_latest; 145 145 in pkgs.linuxManualConfig { ··· 198 198 available kernel version <emphasis>that is supported by 199 199 ZFS</emphasis> like this: 200 200 </para> 201 - <programlisting language="bash"> 201 + <programlisting language="nix"> 202 202 { 203 203 boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages; 204 204 }
+4 -4
nixos/doc/manual/from_md/configuration/luks-file-systems.section.xml
··· 30 30 at boot time as <literal>/</literal>, add the following to 31 31 <literal>configuration.nix</literal>: 32 32 </para> 33 - <programlisting language="bash"> 33 + <programlisting language="nix"> 34 34 boot.initrd.luks.devices.crypted.device = &quot;/dev/disk/by-uuid/3f6b0024-3a44-4fde-a43a-767b872abe5d&quot;; 35 35 fileSystems.&quot;/&quot;.device = &quot;/dev/mapper/crypted&quot;; 36 36 </programlisting> ··· 39 39 located on an encrypted partition, it is necessary to add the 40 40 following grub option: 41 41 </para> 42 - <programlisting language="bash"> 42 + <programlisting language="nix"> 43 43 boot.loader.grub.enableCryptodisk = true; 44 44 </programlisting> 45 45 <section xml:id="sec-luks-file-systems-fido2"> ··· 67 67 compatible key, add the following to 68 68 <literal>configuration.nix</literal>: 69 69 </para> 70 - <programlisting language="bash"> 70 + <programlisting language="nix"> 71 71 boot.initrd.luks.fido2Support = true; 72 72 boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.credential = &quot;f1d00200108b9d6e849a8b388da457688e3dd653b4e53770012d8f28e5d3b269865038c346802f36f3da7278b13ad6a3bb6a1452e24ebeeaa24ba40eef559b1b287d2a2f80b7&quot;; 73 73 </programlisting> ··· 77 77 protected, such as 78 78 <link xlink:href="https://trezor.io/">Trezor</link>. 79 79 </para> 80 - <programlisting language="bash"> 80 + <programlisting language="nix"> 81 81 boot.initrd.luks.devices.&quot;/dev/sda2&quot;.fido2.passwordLess = true; 82 82 </programlisting> 83 83 </section>
+6 -6
nixos/doc/manual/from_md/configuration/modularity.section.xml
··· 14 14 other modules by including them from 15 15 <literal>configuration.nix</literal>, e.g.: 16 16 </para> 17 - <programlisting language="bash"> 17 + <programlisting language="nix"> 18 18 { config, pkgs, ... }: 19 19 20 20 { imports = [ ./vpn.nix ./kde.nix ]; ··· 28 28 <literal>vpn.nix</literal> and <literal>kde.nix</literal>. The 29 29 latter might look like this: 30 30 </para> 31 - <programlisting language="bash"> 31 + <programlisting language="nix"> 32 32 { config, pkgs, ... }: 33 33 34 34 { services.xserver.enable = true; ··· 50 50 you want it to appear first, you can use 51 51 <literal>mkBefore</literal>: 52 52 </para> 53 - <programlisting language="bash"> 53 + <programlisting language="nix"> 54 54 boot.kernelModules = mkBefore [ &quot;kvm-intel&quot; ]; 55 55 </programlisting> 56 56 <para> ··· 70 70 When that happens, it’s possible to force one definition take 71 71 precedence over the others: 72 72 </para> 73 - <programlisting language="bash"> 73 + <programlisting language="nix"> 74 74 services.httpd.adminAddr = pkgs.lib.mkForce &quot;bob@example.org&quot;; 75 75 </programlisting> 76 76 <para> ··· 93 93 <xref linkend="opt-services.xserver.enable" /> is set to 94 94 <literal>true</literal> somewhere else: 95 95 </para> 96 - <programlisting language="bash"> 96 + <programlisting language="nix"> 97 97 { config, pkgs, ... }: 98 98 99 99 { environment.systemPackages = ··· 137 137 below would have the same effect as importing a file which sets 138 138 those options. 139 139 </para> 140 - <programlisting language="bash"> 140 + <programlisting language="nix"> 141 141 { config, pkgs, ... }: 142 142 143 143 let netConfig = hostName: {
+3 -3
nixos/doc/manual/from_md/configuration/network-manager.section.xml
··· 4 4 To facilitate network configuration, some desktop environments use 5 5 NetworkManager. You can enable NetworkManager by setting: 6 6 </para> 7 - <programlisting language="bash"> 7 + <programlisting language="nix"> 8 8 networking.networkmanager.enable = true; 9 9 </programlisting> 10 10 <para> ··· 15 15 All users that should have permission to change network settings 16 16 must belong to the <literal>networkmanager</literal> group: 17 17 </para> 18 - <programlisting language="bash"> 18 + <programlisting language="nix"> 19 19 users.users.alice.extraGroups = [ &quot;networkmanager&quot; ]; 20 20 </programlisting> 21 21 <para> ··· 36 36 used together if desired. To do this you need to instruct 37 37 NetworkManager to ignore those interfaces like: 38 38 </para> 39 - <programlisting language="bash"> 39 + <programlisting language="nix"> 40 40 networking.networkmanager.unmanaged = [ 41 41 &quot;*&quot; &quot;except:type:wwan&quot; &quot;except:type:gsm&quot; 42 42 ];
+1 -1
nixos/doc/manual/from_md/configuration/profiles.chapter.xml
··· 9 9 to say, expected usage is to add them to the imports list of your 10 10 <literal>/etc/configuration.nix</literal> as such: 11 11 </para> 12 - <programlisting language="bash"> 12 + <programlisting language="nix"> 13 13 imports = [ 14 14 &lt;nixpkgs/nixos/modules/profiles/profile-name.nix&gt; 15 15 ];
+2 -2
nixos/doc/manual/from_md/configuration/renaming-interfaces.section.xml
··· 30 30 the interface with MAC address 31 31 <literal>52:54:00:12:01:01</literal> using a netword link unit: 32 32 </para> 33 - <programlisting language="bash"> 33 + <programlisting language="nix"> 34 34 systemd.network.links.&quot;10-wan&quot; = { 35 35 matchConfig.PermanentMACAddress = &quot;52:54:00:12:01:01&quot;; 36 36 linkConfig.Name = &quot;wan&quot;; ··· 43 43 <para> 44 44 Alternatively, we can use a plain old udev rule: 45 45 </para> 46 - <programlisting language="bash"> 46 + <programlisting language="nix"> 47 47 services.udev.initrdRules = '' 48 48 SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, \ 49 49 ATTR{address}==&quot;52:54:00:12:01:01&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;wan&quot;
+2 -2
nixos/doc/manual/from_md/configuration/ssh.section.xml
··· 3 3 <para> 4 4 Secure shell (SSH) access to your machine can be enabled by setting: 5 5 </para> 6 - <programlisting language="bash"> 6 + <programlisting language="nix"> 7 7 services.openssh.enable = true; 8 8 </programlisting> 9 9 <para> ··· 16 16 You can declaratively specify authorised RSA/DSA public keys for a 17 17 user as follows: 18 18 </para> 19 - <programlisting language="bash"> 19 + <programlisting language="nix"> 20 20 users.users.alice.openssh.authorizedKeys.keys = 21 21 [ &quot;ssh-dss AAAAB3NzaC1kc3MAAACBAPIkGWVEt4...&quot; ]; 22 22 </programlisting>
+3 -3
nixos/doc/manual/from_md/configuration/sshfs-file-systems.section.xml
··· 54 54 <link linkend="opt-fileSystems">fileSystems</link> option. Here’s 55 55 a typical setup: 56 56 </para> 57 - <programlisting language="bash"> 57 + <programlisting language="nix"> 58 58 { 59 59 system.fsPackages = [ pkgs.sshfs ]; 60 60 ··· 80 80 well, for example you can change the default SSH port or specify a 81 81 jump proxy: 82 82 </para> 83 - <programlisting language="bash"> 83 + <programlisting language="nix"> 84 84 { 85 85 options = 86 86 [ &quot;ProxyJump=bastion@example.com&quot; ··· 92 92 It’s also possible to change the <literal>ssh</literal> command 93 93 used by SSHFS to connect to the server. For example: 94 94 </para> 95 - <programlisting language="bash"> 95 + <programlisting language="nix"> 96 96 { 97 97 options = 98 98 [ (builtins.replaceStrings [&quot; &quot;] [&quot;\\040&quot;]
+3 -3
nixos/doc/manual/from_md/configuration/subversion.chapter.xml
··· 25 25 Apache HTTP, setting 26 26 <xref linkend="opt-services.httpd.adminAddr" /> appropriately: 27 27 </para> 28 - <programlisting language="bash"> 28 + <programlisting language="nix"> 29 29 services.httpd.enable = true; 30 30 services.httpd.adminAddr = ...; 31 31 networking.firewall.allowedTCPPorts = [ 80 443 ]; ··· 40 40 <literal>.authz</literal> file describing access permission, and 41 41 <literal>AuthUserFile</literal> to the password file. 42 42 </para> 43 - <programlisting language="bash"> 43 + <programlisting language="nix"> 44 44 services.httpd.extraModules = [ 45 45 # note that order is *super* important here 46 46 { name = &quot;dav_svn&quot;; path = &quot;${pkgs.apacheHttpdPackages.subversion}/modules/mod_dav_svn.so&quot;; } ··· 106 106 <literal>ACCESS_FILE</literal> will look something like the 107 107 following: 108 108 </para> 109 - <programlisting language="bash"> 109 + <programlisting language="nix"> 110 110 [/] 111 111 * = r 112 112
+3 -3
nixos/doc/manual/from_md/configuration/user-mgmt.chapter.xml
··· 7 7 states that a user account named <literal>alice</literal> shall 8 8 exist: 9 9 </para> 10 - <programlisting language="bash"> 10 + <programlisting language="nix"> 11 11 users.users.alice = { 12 12 isNormalUser = true; 13 13 home = &quot;/home/alice&quot;; ··· 45 45 A user ID (uid) is assigned automatically. You can also specify a 46 46 uid manually by adding 47 47 </para> 48 - <programlisting language="bash"> 48 + <programlisting language="nix"> 49 49 uid = 1000; 50 50 </programlisting> 51 51 <para> ··· 55 55 Groups can be specified similarly. The following states that a group 56 56 named <literal>students</literal> shall exist: 57 57 </para> 58 - <programlisting language="bash"> 58 + <programlisting language="nix"> 59 59 users.groups.students.gid = 1000; 60 60 </programlisting> 61 61 <para>
+2 -2
nixos/doc/manual/from_md/configuration/wayland.chapter.xml
··· 10 10 Compositor such as sway without separately enabling a Wayland 11 11 server: 12 12 </para> 13 - <programlisting language="bash"> 13 + <programlisting language="nix"> 14 14 programs.sway.enable = true; 15 15 </programlisting> 16 16 <para> ··· 22 22 be able to share your screen, you might want to activate this 23 23 option: 24 24 </para> 25 - <programlisting language="bash"> 25 + <programlisting language="nix"> 26 26 xdg.portal.wlr.enable = true; 27 27 </programlisting> 28 28 <para>
+3 -3
nixos/doc/manual/from_md/configuration/wireless.section.xml
··· 9 9 <para> 10 10 NixOS will start wpa_supplicant for you if you enable this setting: 11 11 </para> 12 - <programlisting language="bash"> 12 + <programlisting language="nix"> 13 13 networking.wireless.enable = true; 14 14 </programlisting> 15 15 <para> 16 16 NixOS lets you specify networks for wpa_supplicant declaratively: 17 17 </para> 18 - <programlisting language="bash"> 18 + <programlisting language="nix"> 19 19 networking.wireless.networks = { 20 20 echelon = { # SSID with no spaces or special characters 21 21 psk = &quot;abcdefgh&quot;; ··· 49 49 psk=dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435 50 50 } 51 51 </programlisting> 52 - <programlisting language="bash"> 52 + <programlisting language="nix"> 53 53 networking.wireless.networks = { 54 54 echelon = { 55 55 pskRaw = &quot;dca6d6ed41f4ab5a984c9f55f6f66d4efdc720ebf66959810f4329bb391c5435&quot;;
+23 -23
nixos/doc/manual/from_md/configuration/x-windows.chapter.xml
··· 4 4 The X Window System (X11) provides the basis of NixOS’ graphical 5 5 user interface. It can be enabled as follows: 6 6 </para> 7 - <programlisting language="bash"> 7 + <programlisting language="nix"> 8 8 services.xserver.enable = true; 9 9 </programlisting> 10 10 <para> ··· 13 13 and <literal>intel</literal>). You can also specify a driver 14 14 manually, e.g. 15 15 </para> 16 - <programlisting language="bash"> 16 + <programlisting language="nix"> 17 17 services.xserver.videoDrivers = [ &quot;r128&quot; ]; 18 18 </programlisting> 19 19 <para> ··· 25 25 <literal>xterm</literal> window. Thus you should pick one or more of 26 26 the following lines: 27 27 </para> 28 - <programlisting language="bash"> 28 + <programlisting language="nix"> 29 29 services.xserver.desktopManager.plasma5.enable = true; 30 30 services.xserver.desktopManager.xfce.enable = true; 31 31 services.xserver.desktopManager.gnome.enable = true; ··· 42 42 LightDM. You can select an alternative one by picking one of the 43 43 following lines: 44 44 </para> 45 - <programlisting language="bash"> 45 + <programlisting language="nix"> 46 46 services.xserver.displayManager.sddm.enable = true; 47 47 services.xserver.displayManager.gdm.enable = true; 48 48 </programlisting> 49 49 <para> 50 50 You can set the keyboard layout (and optionally the layout variant): 51 51 </para> 52 - <programlisting language="bash"> 52 + <programlisting language="nix"> 53 53 services.xserver.layout = &quot;de&quot;; 54 54 services.xserver.xkbVariant = &quot;neo&quot;; 55 55 </programlisting> ··· 57 57 The X server is started automatically at boot time. If you don’t 58 58 want this to happen, you can set: 59 59 </para> 60 - <programlisting language="bash"> 60 + <programlisting language="nix"> 61 61 services.xserver.autorun = false; 62 62 </programlisting> 63 63 <para> ··· 70 70 On 64-bit systems, if you want OpenGL for 32-bit programs such as in 71 71 Wine, you should also set the following: 72 72 </para> 73 - <programlisting language="bash"> 73 + <programlisting language="nix"> 74 74 hardware.opengl.driSupport32Bit = true; 75 75 </programlisting> 76 76 <section xml:id="sec-x11-auto-login"> ··· 90 90 manager and desktop environment. If you wanted no desktop 91 91 environment and i3 as your your window manager, you’d define: 92 92 </para> 93 - <programlisting language="bash"> 93 + <programlisting language="nix"> 94 94 services.xserver.displayManager.defaultSession = &quot;none+i3&quot;; 95 95 </programlisting> 96 96 <para> 97 97 Every display manager in NixOS supports auto-login, here is an 98 98 example using lightdm for a user <literal>alice</literal>: 99 99 </para> 100 - <programlisting language="bash"> 100 + <programlisting language="nix"> 101 101 services.xserver.displayManager.lightdm.enable = true; 102 102 services.xserver.displayManager.autoLogin.enable = true; 103 103 services.xserver.displayManager.autoLogin.user = &quot;alice&quot;; ··· 131 131 <xref linkend="opt-services.xserver.videoDrivers" /> to set one. 132 132 The recommended configuration for modern systems is: 133 133 </para> 134 - <programlisting language="bash"> 134 + <programlisting language="nix"> 135 135 services.xserver.videoDrivers = [ &quot;modesetting&quot; ]; 136 136 </programlisting> 137 137 <para> 138 138 If you experience screen tearing no matter what, this 139 139 configuration was reported to resolve the issue: 140 140 </para> 141 - <programlisting language="bash"> 141 + <programlisting language="nix"> 142 142 services.xserver.videoDrivers = [ &quot;intel&quot; ]; 143 143 services.xserver.deviceSection = '' 144 144 Option &quot;DRI&quot; &quot;2&quot; ··· 159 159 enabled by default because it’s not free software. You can enable 160 160 it as follows: 161 161 </para> 162 - <programlisting language="bash"> 162 + <programlisting language="nix"> 163 163 services.xserver.videoDrivers = [ &quot;nvidia&quot; ]; 164 164 </programlisting> 165 165 <para> 166 166 Or if you have an older card, you may have to use one of the 167 167 legacy drivers: 168 168 </para> 169 - <programlisting language="bash"> 169 + <programlisting language="nix"> 170 170 services.xserver.videoDrivers = [ &quot;nvidiaLegacy390&quot; ]; 171 171 services.xserver.videoDrivers = [ &quot;nvidiaLegacy340&quot; ]; 172 172 services.xserver.videoDrivers = [ &quot;nvidiaLegacy304&quot; ]; ··· 185 185 features or performance. If you still want to use it anyway, you 186 186 need to explicitly set: 187 187 </para> 188 - <programlisting language="bash"> 188 + <programlisting language="nix"> 189 189 services.xserver.videoDrivers = [ &quot;amdgpu-pro&quot; ]; 190 190 </programlisting> 191 191 <para> ··· 199 199 Support for Synaptics touchpads (found in many laptops such as the 200 200 Dell Latitude series) can be enabled as follows: 201 201 </para> 202 - <programlisting language="bash"> 202 + <programlisting language="nix"> 203 203 services.xserver.libinput.enable = true; 204 204 </programlisting> 205 205 <para> 206 206 The driver has many options (see <xref linkend="ch-options" />). 207 207 For instance, the following disables tap-to-click behavior: 208 208 </para> 209 - <programlisting language="bash"> 209 + <programlisting language="nix"> 210 210 services.xserver.libinput.touchpad.tapping = false; 211 211 </programlisting> 212 212 <para> ··· 222 222 applications look similar to GTK ones, you can use the following 223 223 configuration: 224 224 </para> 225 - <programlisting language="bash"> 225 + <programlisting language="nix"> 226 226 qt5.enable = true; 227 227 qt5.platformTheme = &quot;gtk2&quot;; 228 228 qt5.style = &quot;gtk2&quot;; ··· 247 247 <literal>symbols</literal>; it’s an XKB peculiarity that will help 248 248 with testing): 249 249 </para> 250 - <programlisting language="bash"> 250 + <programlisting language="nix"> 251 251 xkb_symbols &quot;us-greek&quot; 252 252 { 253 253 include &quot;us(basic)&quot; // includes the base US keys ··· 263 263 <para> 264 264 A minimal layout specification must include the following: 265 265 </para> 266 - <programlisting language="bash"> 266 + <programlisting language="nix"> 267 267 services.xserver.extraLayouts.us-greek = { 268 268 description = &quot;US layout with alt-gr greek&quot;; 269 269 languages = [ &quot;eng&quot; ]; ··· 312 312 interest, then create a <literal>media-key</literal> file to hold 313 313 the keycodes definitions 314 314 </para> 315 - <programlisting language="bash"> 315 + <programlisting language="nix"> 316 316 xkb_keycodes &quot;media&quot; 317 317 { 318 318 &lt;volUp&gt; = 123; ··· 322 322 <para> 323 323 Now use the newly define keycodes in <literal>media-sym</literal>: 324 324 </para> 325 - <programlisting language="bash"> 325 + <programlisting language="nix"> 326 326 xkb_symbols &quot;media&quot; 327 327 { 328 328 key.type = &quot;ONE_LEVEL&quot;; ··· 333 333 <para> 334 334 As before, to install the layout do 335 335 </para> 336 - <programlisting language="bash"> 336 + <programlisting language="nix"> 337 337 services.xserver.extraLayouts.media = { 338 338 description = &quot;Multimedia keys remapping&quot;; 339 339 languages = [ &quot;eng&quot; ]; ··· 357 357 default. As a workaround, you can set the keymap using 358 358 <literal>setxkbmap</literal> at the start of the session with: 359 359 </para> 360 - <programlisting language="bash"> 360 + <programlisting language="nix"> 361 361 services.xserver.displayManager.sessionCommands = &quot;setxkbmap -keycodes media&quot;; 362 362 </programlisting> 363 363 <para>
+2 -2
nixos/doc/manual/from_md/configuration/xfce.chapter.xml
··· 3 3 <para> 4 4 To enable the Xfce Desktop Environment, set 5 5 </para> 6 - <programlisting language="bash"> 6 + <programlisting language="nix"> 7 7 services.xserver.desktopManager.xfce.enable = true; 8 8 services.xserver.displayManager.defaultSession = &quot;xfce&quot;; 9 9 </programlisting> ··· 11 11 Optionally, <emphasis>picom</emphasis> can be enabled for nice 12 12 graphical effects, some example settings: 13 13 </para> 14 - <programlisting language="bash"> 14 + <programlisting language="nix"> 15 15 services.picom = { 16 16 enable = true; 17 17 fade = true;
+1 -1
nixos/doc/manual/from_md/development/activation-script.section.xml
··· 22 22 these dependencies into account and order the snippets accordingly. 23 23 As a simple example: 24 24 </para> 25 - <programlisting language="bash"> 25 + <programlisting language="nix"> 26 26 system.activationScripts.my-activation-script = { 27 27 deps = [ &quot;etc&quot; ]; 28 28 # supportsDryActivation = true;
+2 -2
nixos/doc/manual/from_md/development/assertions.section.xml
··· 18 18 <para> 19 19 This is an example of using <literal>warnings</literal>. 20 20 </para> 21 - <programlisting language="bash"> 21 + <programlisting language="nix"> 22 22 { config, lib, ... }: 23 23 { 24 24 config = lib.mkIf config.services.foo.enable { ··· 42 42 assertion is useful to prevent such a broken system from being 43 43 built. 44 44 </para> 45 - <programlisting language="bash"> 45 + <programlisting language="nix"> 46 46 { config, lib, ... }: 47 47 { 48 48 config = lib.mkIf config.services.syslogd.enable {
+1 -1
nixos/doc/manual/from_md/development/bootspec.chapter.xml
··· 43 43 <literal>/etc/os-release</literal> in order to bake it into a 44 44 unified kernel image: 45 45 </para> 46 - <programlisting language="bash"> 46 + <programlisting language="nix"> 47 47 { config, lib, ... }: { 48 48 boot.bootspec.extensions = { 49 49 &quot;org.secureboot.osRelease&quot; = config.environment.etc.&quot;os-release&quot;.source;
+3 -3
nixos/doc/manual/from_md/development/freeform-modules.section.xml
··· 30 30 type-checked <literal>settings</literal> attribute</link> for a more 31 31 complete example. 32 32 </para> 33 - <programlisting language="bash"> 33 + <programlisting language="nix"> 34 34 { lib, config, ... }: { 35 35 36 36 options.settings = lib.mkOption { ··· 52 52 <para> 53 53 And the following shows what such a module then allows 54 54 </para> 55 - <programlisting language="bash"> 55 + <programlisting language="nix"> 56 56 { 57 57 # Not a declared option, but the freeform type allows this 58 58 settings.logLevel = &quot;debug&quot;; ··· 72 72 Freeform attributes cannot depend on other attributes of the same 73 73 set without infinite recursion: 74 74 </para> 75 - <programlisting language="bash"> 75 + <programlisting language="nix"> 76 76 { 77 77 # This throws infinite recursion encountered 78 78 settings.logLevel = lib.mkIf (config.settings.port == 80) &quot;debug&quot;;
+4 -4
nixos/doc/manual/from_md/development/importing-modules.section.xml
··· 4 4 Sometimes NixOS modules need to be used in configuration but exist 5 5 outside of Nixpkgs. These modules can be imported: 6 6 </para> 7 - <programlisting language="bash"> 7 + <programlisting language="nix"> 8 8 { config, lib, pkgs, ... }: 9 9 10 10 { ··· 23 23 Nixpkgs NixOS modules. Like any NixOS module, this module can import 24 24 additional modules: 25 25 </para> 26 - <programlisting language="bash"> 26 + <programlisting language="nix"> 27 27 # ./module-list/default.nix 28 28 [ 29 29 ./example-module1 30 30 ./example-module2 31 31 ] 32 32 </programlisting> 33 - <programlisting language="bash"> 33 + <programlisting language="nix"> 34 34 # ./extra-module/default.nix 35 35 { imports = import ./module-list.nix; } 36 36 </programlisting> 37 - <programlisting language="bash"> 37 + <programlisting language="nix"> 38 38 # NIXOS_EXTRA_MODULE_PATH=/absolute/path/to/extra-module 39 39 { config, lib, pkgs, ... }: 40 40
+1 -1
nixos/doc/manual/from_md/development/meta-attributes.section.xml
··· 15 15 Each of the meta-attributes must be defined at most once per module 16 16 file. 17 17 </para> 18 - <programlisting language="bash"> 18 + <programlisting language="nix"> 19 19 { config, lib, pkgs, ... }: 20 20 { 21 21 options = {
+8 -8
nixos/doc/manual/from_md/development/option-declarations.section.xml
··· 6 6 hasn’t been declared in any module. An option declaration generally 7 7 looks like this: 8 8 </para> 9 - <programlisting language="bash"> 9 + <programlisting language="nix"> 10 10 options = { 11 11 name = mkOption { 12 12 type = type specification; ··· 127 127 For example: 128 128 </para> 129 129 <anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" /> 130 - <programlisting language="bash"> 130 + <programlisting language="nix"> 131 131 lib.mkEnableOption &quot;magic&quot; 132 132 # is like 133 133 lib.mkOption { ··· 142 142 <para> 143 143 Usage: 144 144 </para> 145 - <programlisting language="bash"> 145 + <programlisting language="nix"> 146 146 mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&quot; &quot;pkgs&quot; ]; example = &quot;literal example&quot;; } 147 147 </programlisting> 148 148 <para> ··· 177 177 Examples: 178 178 </para> 179 179 <anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" /> 180 - <programlisting language="bash"> 180 + <programlisting language="nix"> 181 181 lib.mkPackageOption pkgs &quot;hello&quot; { } 182 182 # is like 183 183 lib.mkOption { ··· 188 188 } 189 189 </programlisting> 190 190 <anchor xml:id="ex-options-declarations-util-mkPackageOption-ghc" /> 191 - <programlisting language="bash"> 191 + <programlisting language="nix"> 192 192 lib.mkPackageOption pkgs &quot;GHC&quot; { 193 193 default = [ &quot;ghc&quot; ]; 194 194 example = &quot;pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])&quot;; ··· 287 287 <emphasis role="strong">Example: Extensible type placeholder 288 288 in the service module</emphasis> 289 289 </para> 290 - <programlisting language="bash"> 290 + <programlisting language="nix"> 291 291 services.xserver.displayManager.enable = mkOption { 292 292 description = &quot;Display manager to use&quot;; 293 293 type = with types; nullOr (enum [ ]); ··· 299 299 <literal>services.xserver.displayManager.enable</literal> in 300 300 the <literal>gdm</literal> module</emphasis> 301 301 </para> 302 - <programlisting language="bash"> 302 + <programlisting language="nix"> 303 303 services.xserver.displayManager.enable = mkOption { 304 304 type = with types; nullOr (enum [ &quot;gdm&quot; ]); 305 305 }; ··· 310 310 <literal>services.xserver.displayManager.enable</literal> in 311 311 the <literal>sddm</literal> module</emphasis> 312 312 </para> 313 - <programlisting language="bash"> 313 + <programlisting language="nix"> 314 314 services.xserver.displayManager.enable = mkOption { 315 315 type = with types; nullOr (enum [ &quot;sddm&quot; ]); 316 316 };
+8 -8
nixos/doc/manual/from_md/development/option-def.section.xml
··· 4 4 Option definitions are generally straight-forward bindings of values 5 5 to option names, like 6 6 </para> 7 - <programlisting language="bash"> 7 + <programlisting language="nix"> 8 8 config = { 9 9 services.httpd.enable = true; 10 10 }; ··· 21 21 another option, you may need to use <literal>mkIf</literal>. 22 22 Consider, for instance: 23 23 </para> 24 - <programlisting language="bash"> 24 + <programlisting language="nix"> 25 25 config = if config.services.httpd.enable then { 26 26 environment.systemPackages = [ ... ]; 27 27 ... ··· 34 34 value being constructed here. After all, you could also write the 35 35 clearly circular and contradictory: 36 36 </para> 37 - <programlisting language="bash"> 37 + <programlisting language="nix"> 38 38 config = if config.services.httpd.enable then { 39 39 services.httpd.enable = false; 40 40 } else { ··· 44 44 <para> 45 45 The solution is to write: 46 46 </para> 47 - <programlisting language="bash"> 47 + <programlisting language="nix"> 48 48 config = mkIf config.services.httpd.enable { 49 49 environment.systemPackages = [ ... ]; 50 50 ... ··· 55 55 of the conditional to be <quote>pushed down</quote> into the 56 56 individual definitions, as if you had written: 57 57 </para> 58 - <programlisting language="bash"> 58 + <programlisting language="nix"> 59 59 config = { 60 60 environment.systemPackages = if config.services.httpd.enable then [ ... ] else []; 61 61 ... ··· 72 72 option defaults have priority 1500. You can specify an explicit 73 73 priority by using <literal>mkOverride</literal>, e.g. 74 74 </para> 75 - <programlisting language="bash"> 75 + <programlisting language="nix"> 76 76 services.openssh.enable = mkOverride 10 false; 77 77 </programlisting> 78 78 <para> ··· 94 94 <literal>mkOrder 500</literal> and 95 95 <literal>mkOrder 1500</literal>, respectively. As an example, 96 96 </para> 97 - <programlisting language="bash"> 97 + <programlisting language="nix"> 98 98 hardware.firmware = mkBefore [ myFirmware ]; 99 99 </programlisting> 100 100 <para> ··· 117 117 to be merged together as if they were declared in separate 118 118 modules. This can be done using <literal>mkMerge</literal>: 119 119 </para> 120 - <programlisting language="bash"> 120 + <programlisting language="nix"> 121 121 config = mkMerge 122 122 [ # Unconditional stuff. 123 123 { environment.systemPackages = [ ... ];
+11 -11
nixos/doc/manual/from_md/development/option-types.section.xml
··· 81 81 <para> 82 82 Two definitions of this type like 83 83 </para> 84 - <programlisting language="bash"> 84 + <programlisting language="nix"> 85 85 { 86 86 str = lib.mkDefault &quot;foo&quot;; 87 87 pkg.hello = pkgs.hello; 88 88 fun.fun = x: x + 1; 89 89 } 90 90 </programlisting> 91 - <programlisting language="bash"> 91 + <programlisting language="nix"> 92 92 { 93 93 str = lib.mkIf true &quot;bar&quot;; 94 94 pkg.gcc = pkgs.gcc; ··· 98 98 <para> 99 99 will get merged to 100 100 </para> 101 - <programlisting language="bash"> 101 + <programlisting language="nix"> 102 102 { 103 103 str = &quot;bar&quot;; 104 104 pkg.gcc = pkgs.gcc; ··· 732 732 <emphasis role="strong">Example: Directly defined 733 733 submodule</emphasis> 734 734 </para> 735 - <programlisting language="bash"> 735 + <programlisting language="nix"> 736 736 options.mod = mkOption { 737 737 description = &quot;submodule example&quot;; 738 738 type = with types; submodule { ··· 752 752 <emphasis role="strong">Example: Submodule defined as a 753 753 reference</emphasis> 754 754 </para> 755 - <programlisting language="bash"> 755 + <programlisting language="nix"> 756 756 let 757 757 modOptions = { 758 758 options = { ··· 787 787 <emphasis role="strong">Example: Declaration of a list of 788 788 submodules</emphasis> 789 789 </para> 790 - <programlisting language="bash"> 790 + <programlisting language="nix"> 791 791 options.mod = mkOption { 792 792 description = &quot;submodule example&quot;; 793 793 type = with types; listOf (submodule { ··· 807 807 <emphasis role="strong">Example: Definition of a list of 808 808 submodules</emphasis> 809 809 </para> 810 - <programlisting language="bash"> 810 + <programlisting language="nix"> 811 811 config.mod = [ 812 812 { foo = 1; bar = &quot;one&quot;; } 813 813 { foo = 2; bar = &quot;two&quot;; } ··· 827 827 <emphasis role="strong">Example: Declaration of attribute sets of 828 828 submodules</emphasis> 829 829 </para> 830 - <programlisting language="bash"> 830 + <programlisting language="nix"> 831 831 options.mod = mkOption { 832 832 description = &quot;submodule example&quot;; 833 833 type = with types; attrsOf (submodule { ··· 847 847 <emphasis role="strong">Example: Definition of attribute sets of 848 848 submodules</emphasis> 849 849 </para> 850 - <programlisting language="bash"> 850 + <programlisting language="nix"> 851 851 config.mod.one = { foo = 1; bar = &quot;one&quot;; }; 852 852 config.mod.two = { foo = 2; bar = &quot;two&quot;; }; 853 853 </programlisting> ··· 878 878 <emphasis role="strong">Example: Adding a type 879 879 check</emphasis> 880 880 </para> 881 - <programlisting language="bash"> 881 + <programlisting language="nix"> 882 882 byte = mkOption { 883 883 description = &quot;An integer between 0 and 255.&quot;; 884 884 type = types.addCheck types.int (x: x &gt;= 0 &amp;&amp; x &lt;= 255); ··· 889 889 <emphasis role="strong">Example: Overriding a type 890 890 check</emphasis> 891 891 </para> 892 - <programlisting language="bash"> 892 + <programlisting language="nix"> 893 893 nixThings = mkOption { 894 894 description = &quot;words that start with 'nix'&quot;; 895 895 type = types.str // {
+2 -2
nixos/doc/manual/from_md/development/replace-modules.section.xml
··· 22 22 only overrides the module definition, this won’t use postgresql from 23 23 nixos-unstable unless explicitly configured to do so. 24 24 </para> 25 - <programlisting language="bash"> 25 + <programlisting language="nix"> 26 26 { config, lib, pkgs, ... }: 27 27 28 28 { ··· 42 42 for an existing module. Importing this module will disable the 43 43 original module without having to know its implementation details. 44 44 </para> 45 - <programlisting language="bash"> 45 + <programlisting language="nix"> 46 46 { config, lib, pkgs, ... }: 47 47 48 48 with lib;
+2 -2
nixos/doc/manual/from_md/development/settings-options.section.xml
··· 317 317 used, along with some other related best practices. See the 318 318 comments for explanations. 319 319 </para> 320 - <programlisting language="bash"> 320 + <programlisting language="nix"> 321 321 { options, config, lib, pkgs, ... }: 322 322 let 323 323 cfg = config.services.foo; ··· 390 390 <emphasis role="strong">Example: Declaring a type-checked 391 391 <literal>settings</literal> attribute</emphasis> 392 392 </para> 393 - <programlisting language="bash"> 393 + <programlisting language="nix"> 394 394 settings = lib.mkOption { 395 395 type = lib.types.submodule { 396 396
+4 -4
nixos/doc/manual/from_md/development/writing-modules.chapter.xml
··· 32 32 In <xref linkend="sec-configuration-syntax" />, we saw the following 33 33 structure of NixOS modules: 34 34 </para> 35 - <programlisting language="bash"> 35 + <programlisting language="nix"> 36 36 { config, pkgs, ... }: 37 37 38 38 { option definitions ··· 50 50 <emphasis role="strong">Example: Structure of NixOS 51 51 Modules</emphasis> 52 52 </para> 53 - <programlisting language="bash"> 53 + <programlisting language="nix"> 54 54 { config, pkgs, ... }: 55 55 56 56 { ··· 146 146 <emphasis role="strong">Example: NixOS Module for the 147 147 <quote>locate</quote> Service</emphasis> 148 148 </para> 149 - <programlisting language="bash"> 149 + <programlisting language="nix"> 150 150 { config, lib, pkgs, ... }: 151 151 152 152 with lib; ··· 208 208 <emphasis role="strong">Example: Escaping in Exec 209 209 directives</emphasis> 210 210 </para> 211 - <programlisting language="bash"> 211 + <programlisting language="nix"> 212 212 { config, lib, pkgs, utils, ... }: 213 213 214 214 with lib;
+34 -22
nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml
··· 3 3 <para> 4 4 A NixOS test is a module that has the following structure: 5 5 </para> 6 - <programlisting language="bash"> 6 + <programlisting language="nix"> 7 7 { 8 8 9 9 # One or more machines: ··· 58 58 Tests that are part of NixOS are added to 59 59 <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/all-tests.nix"><literal>nixos/tests/all-tests.nix</literal></link>. 60 60 </para> 61 - <programlisting language="bash"> 61 + <programlisting language="nix"> 62 62 hostname = runTest ./hostname.nix; 63 63 </programlisting> 64 64 <para> 65 65 Overrides can be added by defining an anonymous module in 66 66 <literal>all-tests.nix</literal>. 67 67 </para> 68 - <programlisting language="bash"> 68 + <programlisting language="nix"> 69 69 hostname = runTest { 70 70 imports = [ ./hostname.nix ]; 71 71 defaults.networking.firewall.enable = false; ··· 87 87 Outside the <literal>nixpkgs</literal> repository, you can 88 88 instantiate the test by first importing the NixOS library, 89 89 </para> 90 - <programlisting language="bash"> 90 + <programlisting language="nix"> 91 91 let nixos-lib = import (nixpkgs + &quot;/nixos/lib&quot;) { }; 92 92 in 93 93 ··· 633 633 For faster dev cycles it’s also possible to disable the 634 634 code-linters (this shouldn’t be committed though): 635 635 </para> 636 - <programlisting language="bash"> 636 + <programlisting language="nix"> 637 637 { 638 638 skipLint = true; 639 639 nodes.machine = ··· 653 653 disable the Black linter directly (again, don’t commit this within 654 654 the Nixpkgs repository): 655 655 </para> 656 - <programlisting language="bash"> 656 + <programlisting language="nix"> 657 657 testScript = 658 658 '' 659 659 # fmt: off ··· 665 665 Similarly, the type checking of test scripts can be disabled in 666 666 the following way: 667 667 </para> 668 - <programlisting language="bash"> 668 + <programlisting language="nix"> 669 669 { 670 670 skipTypeCheck = true; 671 671 nodes.machine = ··· 700 700 <literal>polling_condition</literal> takes the following 701 701 (optional) arguments: 702 702 </para> 703 - <para> 704 - <literal>seconds_interval</literal> 705 - </para> 706 - <para> 707 - : specifies how often the condition should be polled: 708 - </para> 703 + <variablelist> 704 + <varlistentry> 705 + <term> 706 + <literal>seconds_interval</literal> 707 + </term> 708 + <listitem> 709 + <para> 710 + specifies how often the condition should be polled: 711 + </para> 712 + </listitem> 713 + </varlistentry> 714 + </variablelist> 709 715 <programlisting language="python"> 710 716 @polling_condition(seconds_interval=10) 711 717 def foo_running(): 712 718 machine.succeed(&quot;pgrep -x foo&quot;) 713 719 </programlisting> 714 - <para> 715 - <literal>description</literal> 716 - </para> 717 - <para> 718 - : is used in the log when the condition is checked. If this is not 719 - provided, the description is pulled from the docstring of the 720 - function. These two are therefore equivalent: 721 - </para> 720 + <variablelist> 721 + <varlistentry> 722 + <term> 723 + <literal>description</literal> 724 + </term> 725 + <listitem> 726 + <para> 727 + is used in the log when the condition is checked. If this is 728 + not provided, the description is pulled from the docstring 729 + of the function. These two are therefore equivalent: 730 + </para> 731 + </listitem> 732 + </varlistentry> 733 + </variablelist> 722 734 <programlisting language="python"> 723 735 @polling_condition 724 736 def foo_running(): ··· 739 751 <literal>extraPythonPackages</literal>. For example, you could add 740 752 <literal>numpy</literal> like this: 741 753 </para> 742 - <programlisting language="bash"> 754 + <programlisting language="nix"> 743 755 { 744 756 extraPythonPackages = p: [ p.numpy ]; 745 757
+1 -1
nixos/doc/manual/from_md/installation/building-nixos.chapter.xml
··· 62 62 can create the following file at 63 63 <literal>modules/installer/cd-dvd/installation-cd-graphical-gnome-macbook.nix</literal>: 64 64 </para> 65 - <programlisting language="bash"> 65 + <programlisting language="nix"> 66 66 { config, ... }: 67 67 68 68 {
+1 -1
nixos/doc/manual/from_md/installation/changing-config.chapter.xml
··· 94 94 unless you have set <literal>mutableUsers = false</literal>. Another 95 95 way is to temporarily add the following to your configuration: 96 96 </para> 97 - <programlisting language="bash"> 97 + <programlisting language="nix"> 98 98 users.users.your-user.initialHashedPassword = &quot;test&quot;; 99 99 </programlisting> 100 100 <para>
+1 -1
nixos/doc/manual/from_md/installation/installing-behind-a-proxy.section.xml
··· 11 11 <literal>/mnt/etc/nixos/configuration.nix</literal> to keep the 12 12 internet accessible after reboot. 13 13 </para> 14 - <programlisting language="bash"> 14 + <programlisting language="nix"> 15 15 networking.proxy.default = &quot;http://user:password@proxy:port/&quot;; 16 16 networking.proxy.noProxy = &quot;127.0.0.1,localhost,internal.domain&quot;; 17 17 </programlisting>
+2 -2
nixos/doc/manual/from_md/installation/installing-from-other-distro.section.xml
··· 129 129 Ubuntu, you may want to add something like this to your 130 130 <literal>configuration.nix</literal>: 131 131 </para> 132 - <programlisting language="bash"> 132 + <programlisting language="nix"> 133 133 boot.loader.grub.extraEntries = '' 134 134 menuentry &quot;Ubuntu&quot; { 135 135 search --set=ubuntu --fs-uuid 3cc3e652-0c1f-4800-8451-033754f68e6e ··· 229 229 account with <literal>sudo passwd -l root</literal> if you use 230 230 <literal>sudo</literal>) 231 231 </para> 232 - <programlisting language="bash"> 232 + <programlisting language="nix"> 233 233 users.users.root.initialHashedPassword = &quot;&quot;; 234 234 </programlisting> 235 235 </listitem>
+1 -1
nixos/doc/manual/from_md/installation/installing-kexec.section.xml
··· 69 69 instead of the default installer image, you can build your own 70 70 <literal>configuration.nix</literal>: 71 71 </para> 72 - <programlisting language="bash"> 72 + <programlisting language="nix"> 73 73 { modulesPath, ... }: { 74 74 imports = [ 75 75 (modulesPath + &quot;/installer/netboot/netboot-minimal.nix&quot;)
+3 -3
nixos/doc/manual/from_md/installation/installing-virtualbox-guest.section.xml
··· 58 58 There are a few modifications you should make in configuration.nix. 59 59 Enable booting: 60 60 </para> 61 - <programlisting language="bash"> 61 + <programlisting language="nix"> 62 62 boot.loader.grub.device = &quot;/dev/sda&quot;; 63 63 </programlisting> 64 64 <para> 65 65 Also remove the fsck that runs at startup. It will always fail to 66 66 run, stopping your boot until you press <literal>*</literal>. 67 67 </para> 68 - <programlisting language="bash"> 68 + <programlisting language="nix"> 69 69 boot.initrd.checkJournalingFS = false; 70 70 </programlisting> 71 71 <para> ··· 76 76 If you do not add <literal>&quot;nofail&quot;</literal>, the system 77 77 will not boot properly. 78 78 </para> 79 - <programlisting language="bash"> 79 + <programlisting language="nix"> 80 80 { config, pkgs, ...} : 81 81 { 82 82 fileSystems.&quot;/virtualboxshare&quot; = {
+2 -2
nixos/doc/manual/from_md/installation/upgrading.chapter.xml
··· 128 128 You can keep a NixOS system up-to-date automatically by adding the 129 129 following to <literal>configuration.nix</literal>: 130 130 </para> 131 - <programlisting language="bash"> 131 + <programlisting language="nix"> 132 132 system.autoUpgrade.enable = true; 133 133 system.autoUpgrade.allowReboot = true; 134 134 </programlisting> ··· 145 145 contains a different kernel, initrd or kernel modules. You can 146 146 also specify a channel explicitly, e.g. 147 147 </para> 148 - <programlisting language="bash"> 148 + <programlisting language="nix"> 149 149 system.autoUpgrade.channel = https://nixos.org/channels/nixos-22.11; 150 150 </programlisting> 151 151 </section>
+5 -5
nixos/doc/manual/from_md/release-notes/rl-1404.section.xml
··· 79 79 the NixOS configuration. For instance, if a package 80 80 <literal>foo</literal> provides systemd units, you can say: 81 81 </para> 82 - <programlisting language="bash"> 82 + <programlisting language="nix"> 83 83 { 84 84 systemd.packages = [ pkgs.foo ]; 85 85 } ··· 88 88 to enable those units. You can then set or override unit options 89 89 in the usual way, e.g. 90 90 </para> 91 - <programlisting language="bash"> 91 + <programlisting language="nix"> 92 92 { 93 93 systemd.services.foo.wantedBy = [ &quot;multi-user.target&quot; ]; 94 94 systemd.services.foo.serviceConfig.MemoryLimit = &quot;512M&quot;; ··· 105 105 NixOS configuration requires unfree packages from Nixpkgs, you 106 106 need to enable support for them explicitly by setting: 107 107 </para> 108 - <programlisting language="bash"> 108 + <programlisting language="nix"> 109 109 { 110 110 nixpkgs.config.allowUnfree = true; 111 111 } ··· 123 123 The Adobe Flash player is no longer enabled by default in the 124 124 Firefox and Chromium wrappers. To enable it, you must set: 125 125 </para> 126 - <programlisting language="bash"> 126 + <programlisting language="nix"> 127 127 { 128 128 nixpkgs.config.allowUnfree = true; 129 129 nixpkgs.config.firefox.enableAdobeFlash = true; # for Firefox ··· 136 136 The firewall is now enabled by default. If you don’t want this, 137 137 you need to disable it explicitly: 138 138 </para> 139 - <programlisting language="bash"> 139 + <programlisting language="nix"> 140 140 { 141 141 networking.firewall.enable = false; 142 142 }
+1 -1
nixos/doc/manual/from_md/release-notes/rl-1412.section.xml
··· 370 370 documentation</link> for details. If you wish to continue to use 371 371 httpd 2.2, add the following line to your NixOS configuration: 372 372 </para> 373 - <programlisting language="bash"> 373 + <programlisting language="nix"> 374 374 { 375 375 services.httpd.package = pkgs.apacheHttpd_2_2; 376 376 }
+7 -7
nixos/doc/manual/from_md/release-notes/rl-1509.section.xml
··· 42 42 </para> 43 43 </listitem> 44 44 </itemizedlist> 45 - <programlisting language="bash"> 45 + <programlisting language="nix"> 46 46 { 47 47 system.autoUpgrade.enable = true; 48 48 } ··· 432 432 </para> 433 433 </listitem> 434 434 </itemizedlist> 435 - <programlisting language="bash"> 435 + <programlisting language="nix"> 436 436 { 437 437 system.stateVersion = &quot;14.12&quot;; 438 438 } ··· 523 523 </para> 524 524 </listitem> 525 525 </itemizedlist> 526 - <programlisting language="bash"> 526 + <programlisting language="nix"> 527 527 { 528 528 fileSystems.&quot;/shiny&quot; = { 529 529 device = &quot;myshinysharedfolder&quot;; ··· 662 662 <literal>lib</literal>, after adding it as argument of the 663 663 module. The following module 664 664 </para> 665 - <programlisting language="bash"> 665 + <programlisting language="nix"> 666 666 { config, pkgs, ... }: 667 667 668 668 with pkgs.lib; ··· 677 677 <para> 678 678 should be modified to look like: 679 679 </para> 680 - <programlisting language="bash"> 680 + <programlisting language="nix"> 681 681 { config, pkgs, lib, ... }: 682 682 683 683 with lib; ··· 695 695 replaced by <literal>(import &lt;nixpkgs&gt; {})</literal>. The 696 696 following module 697 697 </para> 698 - <programlisting language="bash"> 698 + <programlisting language="nix"> 699 699 { config, pkgs, ... }: 700 700 701 701 let ··· 712 712 <para> 713 713 should be modified to look like: 714 714 </para> 715 - <programlisting language="bash"> 715 + <programlisting language="nix"> 716 716 { config, pkgs, ... }: 717 717 718 718 let
+6 -6
nixos/doc/manual/from_md/release-notes/rl-1603.section.xml
··· 378 378 You will need to add an import statement to your NixOS 379 379 configuration in order to use it, e.g. 380 380 </para> 381 - <programlisting language="bash"> 381 + <programlisting language="nix"> 382 382 { 383 383 imports = [ &lt;nixpkgs/nixos/modules/services/misc/gitit.nix&gt; ]; 384 384 } ··· 395 395 to be built in. All modules now reside in 396 396 <literal>nginxModules</literal> set. Example configuration: 397 397 </para> 398 - <programlisting language="bash"> 398 + <programlisting language="nix"> 399 399 nginx.override { 400 400 modules = [ nginxModules.rtmp nginxModules.dav nginxModules.moreheaders ]; 401 401 } ··· 468 468 continue to work, but print a warning, until the 16.09 release. 469 469 An example of the new style: 470 470 </para> 471 - <programlisting language="bash"> 471 + <programlisting language="nix"> 472 472 { 473 473 fileSystems.&quot;/example&quot; = { 474 474 device = &quot;/dev/sdc&quot;; ··· 524 524 used input method name, <literal>&quot;ibus&quot;</literal> for 525 525 ibus. An example of the new style: 526 526 </para> 527 - <programlisting language="bash"> 527 + <programlisting language="nix"> 528 528 { 529 529 i18n.inputMethod.enabled = &quot;ibus&quot;; 530 530 i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [ anthy mozc ]; ··· 533 533 <para> 534 534 That is equivalent to the old version: 535 535 </para> 536 - <programlisting language="bash"> 536 + <programlisting language="nix"> 537 537 { 538 538 programs.ibus.enable = true; 539 539 programs.ibus.plugins = with pkgs; [ ibus-anthy mozc ]; ··· 587 587 point to exact folder where syncthing is writing to. Example 588 588 configuration should look something like: 589 589 </para> 590 - <programlisting language="bash"> 590 + <programlisting language="nix"> 591 591 { 592 592 services.syncthing = { 593 593 enable = true;
+1 -1
nixos/doc/manual/from_md/release-notes/rl-1609.section.xml
··· 192 192 interface has been streamlined. Desktop users should be able to 193 193 simply set 194 194 </para> 195 - <programlisting language="bash"> 195 + <programlisting language="nix"> 196 196 { 197 197 security.grsecurity.enable = true; 198 198 }
+4 -4
nixos/doc/manual/from_md/release-notes/rl-1703.section.xml
··· 581 581 <literal>service.nylon</literal> is now declared using named 582 582 instances. As an example: 583 583 </para> 584 - <programlisting language="bash"> 584 + <programlisting language="nix"> 585 585 { 586 586 services.nylon = { 587 587 enable = true; ··· 594 594 <para> 595 595 should be replaced with: 596 596 </para> 597 - <programlisting language="bash"> 597 + <programlisting language="nix"> 598 598 { 599 599 services.nylon.myvpn = { 600 600 enable = true; ··· 615 615 <link xlink:href="https://nixos.org/nixpkgs/manual/#sec-overlays-install"> 616 616 overlays</link>. For example, the following code: 617 617 </para> 618 - <programlisting language="bash"> 618 + <programlisting language="nix"> 619 619 let 620 620 pkgs = import &lt;nixpkgs&gt; {}; 621 621 in ··· 624 624 <para> 625 625 should be replaced by: 626 626 </para> 627 - <programlisting language="bash"> 627 + <programlisting language="nix"> 628 628 let 629 629 pkgs = import &lt;nixpkgs&gt; {}; 630 630 in
+1 -1
nixos/doc/manual/from_md/release-notes/rl-1709.section.xml
··· 29 29 head. Apart from that, it’s now possible to also set 30 30 additional options by using an attribute set, for example: 31 31 </para> 32 - <programlisting language="bash"> 32 + <programlisting language="nix"> 33 33 { services.xserver.xrandrHeads = [ 34 34 &quot;HDMI-0&quot; 35 35 {
+1 -1
nixos/doc/manual/from_md/release-notes/rl-1803.section.xml
··· 830 830 <para> 831 831 In order to have the previous default configuration add 832 832 </para> 833 - <programlisting language="bash"> 833 + <programlisting language="nix"> 834 834 { 835 835 services.xserver.displayManager.lightdm.greeters.gtk.indicators = [ 836 836 &quot;~host&quot; &quot;~spacer&quot;
+3 -3
nixos/doc/manual/from_md/release-notes/rl-1809.section.xml
··· 54 54 <para> 55 55 For example 56 56 </para> 57 - <programlisting language="bash"> 57 + <programlisting language="nix"> 58 58 { 59 59 programs.firejail = { 60 60 enable = true; ··· 695 695 A NixOS system can now be constructed more easily based on a 696 696 preexisting invocation of Nixpkgs. For example: 697 697 </para> 698 - <programlisting language="bash"> 698 + <programlisting language="nix"> 699 699 { 700 700 inherit (pkgs.nixos { 701 701 boot.loader.grub.enable = false; ··· 791 791 <para> 792 792 An example usage of this would be: 793 793 </para> 794 - <programlisting language="bash"> 794 + <programlisting language="nix"> 795 795 { config, ... }: 796 796 797 797 {
+1 -1
nixos/doc/manual/from_md/release-notes/rl-1903.section.xml
··· 374 374 setting the <literal>services.nscd.config</literal> option 375 375 with the desired caching parameters. 376 376 </para> 377 - <programlisting language="bash"> 377 + <programlisting language="nix"> 378 378 { 379 379 services.nscd.config = 380 380 ''
+10 -10
nixos/doc/manual/from_md/release-notes/rl-2003.section.xml
··· 133 133 option to improve support for upstream session files. If you 134 134 used something like: 135 135 </para> 136 - <programlisting language="bash"> 136 + <programlisting language="nix"> 137 137 { 138 138 services.xserver.desktopManager.default = &quot;xfce&quot;; 139 139 services.xserver.windowManager.default = &quot;icewm&quot;; ··· 142 142 <para> 143 143 you should change it to: 144 144 </para> 145 - <programlisting language="bash"> 145 + <programlisting language="nix"> 146 146 { 147 147 services.xserver.displayManager.defaultSession = &quot;xfce+icewm&quot;; 148 148 } ··· 821 821 is a <literal>loaOf</literal> option that is commonly used as 822 822 follows: 823 823 </para> 824 - <programlisting language="bash"> 824 + <programlisting language="nix"> 825 825 { 826 826 users.users = 827 827 [ { name = &quot;me&quot;; ··· 836 836 value of <literal>name</literal> as the name of the attribute 837 837 set: 838 838 </para> 839 - <programlisting language="bash"> 839 + <programlisting language="nix"> 840 840 { 841 841 users.users.me = 842 842 { description = &quot;My personal user.&quot;; ··· 940 940 because it permitted root auto-login you can override the 941 941 lightdm-autologin pam module like: 942 942 </para> 943 - <programlisting language="bash"> 943 + <programlisting language="nix"> 944 944 { 945 945 security.pam.services.lightdm-autologin.text = lib.mkForce '' 946 946 auth requisite pam_nologin.so ··· 1004 1004 Additionally, some Postfix configuration must now be set 1005 1005 manually instead of automatically by the Mailman module: 1006 1006 </para> 1007 - <programlisting language="bash"> 1007 + <programlisting language="nix"> 1008 1008 { 1009 1009 services.postfix.relayDomains = [ &quot;hash:/var/lib/mailman/data/postfix_domains&quot; ]; 1010 1010 services.postfix.config.transport_maps = [ &quot;hash:/var/lib/mailman/data/postfix_lmtp&quot; ]; ··· 1066 1066 or by passing a TOML configuration file via 1067 1067 <link xlink:href="options.html#opt-services.dnscrypt-proxy2.configFile">services.dnscrypt-proxy2.configFile</link>. 1068 1068 </para> 1069 - <programlisting language="bash"> 1069 + <programlisting language="nix"> 1070 1070 { 1071 1071 # Example configuration: 1072 1072 services.dnscrypt-proxy2.enable = true; ··· 1229 1229 when upgrading. Otherwise, the package can be deployed 1230 1230 using the following config: 1231 1231 </para> 1232 - <programlisting language="bash"> 1232 + <programlisting language="nix"> 1233 1233 { pkgs, ... }: { 1234 1234 services.hydra.package = pkgs.hydra-migration; 1235 1235 } ··· 1319 1319 <para> 1320 1320 To continue to use the old approach, you can configure: 1321 1321 </para> 1322 - <programlisting language="bash"> 1322 + <programlisting language="nix"> 1323 1323 { 1324 1324 services.nginx.appendConfig = let cfg = config.services.nginx; in ''user ${cfg.user} ${cfg.group};''; 1325 1325 systemd.services.nginx.serviceConfig.User = lib.mkForce &quot;root&quot;; ··· 1432 1432 older, you simply need to enable postgresql-support 1433 1433 explicitly: 1434 1434 </para> 1435 - <programlisting language="bash"> 1435 + <programlisting language="nix"> 1436 1436 { ... }: { 1437 1437 services.matrix-synapse = { 1438 1438 enable = true;
+20 -20
nixos/doc/manual/from_md/release-notes/rl-2009.section.xml
··· 730 730 traditional mysql_native_password plugin method, one must run 731 731 the following: 732 732 </para> 733 - <programlisting language="bash"> 733 + <programlisting language="nix"> 734 734 { 735 735 services.mysql.initialScript = pkgs.writeText &quot;mariadb-init.sql&quot; '' 736 736 ALTER USER root@localhost IDENTIFIED VIA mysql_native_password USING PASSWORD(&quot;verysecret&quot;); ··· 755 755 allow MySQL to read from /home and /tmp directories when using 756 756 <literal>LOAD DATA INFILE</literal> 757 757 </para> 758 - <programlisting language="bash"> 758 + <programlisting language="nix"> 759 759 { 760 760 systemd.services.mysql.serviceConfig.ProtectHome = lib.mkForce &quot;read-only&quot;; 761 761 } ··· 766 766 <literal>SELECT * INTO OUTFILE</literal>, assuming the mysql 767 767 user has write access to <literal>/var/data</literal> 768 768 </para> 769 - <programlisting language="bash"> 769 + <programlisting language="nix"> 770 770 { 771 771 systemd.services.mysql.serviceConfig.ReadWritePaths = [ &quot;/var/data&quot; ]; 772 772 } ··· 885 885 <literal>phantomJsSupport = true</literal> to the package 886 886 instantiation: 887 887 </para> 888 - <programlisting language="bash"> 888 + <programlisting language="nix"> 889 889 { 890 890 services.grafana.package = pkgs.grafana.overrideAttrs (oldAttrs: rec { 891 891 phantomJsSupport = true; ··· 958 958 <literal>opcache</literal>, <literal>pdo</literal> and 959 959 <literal>pdo_mysql</literal> loaded: 960 960 </para> 961 - <programlisting language="bash"> 961 + <programlisting language="nix"> 962 962 { 963 963 environment.systemPackages = [ 964 964 (pkgs.php.withExtensions ··· 997 997 The remaining configuration flags can now be set directly on 998 998 the <literal>php</literal> attribute. For example, instead of 999 999 </para> 1000 - <programlisting language="bash"> 1000 + <programlisting language="nix"> 1001 1001 { 1002 1002 php.override { 1003 1003 config.php.embed = true; ··· 1008 1008 <para> 1009 1009 you should now write 1010 1010 </para> 1011 - <programlisting language="bash"> 1011 + <programlisting language="nix"> 1012 1012 { 1013 1013 php.override { 1014 1014 embedSupport = true; ··· 1062 1062 writing to other folders, use 1063 1063 <literal>systemd.services.nginx.serviceConfig.ReadWritePaths</literal> 1064 1064 </para> 1065 - <programlisting language="bash"> 1065 + <programlisting language="nix"> 1066 1066 { 1067 1067 systemd.services.nginx.serviceConfig.ReadWritePaths = [ &quot;/var/www&quot; ]; 1068 1068 } ··· 1076 1076 docs</link> for details). If you require serving files from 1077 1077 home directories, you may choose to set e.g. 1078 1078 </para> 1079 - <programlisting language="bash"> 1079 + <programlisting language="nix"> 1080 1080 { 1081 1081 systemd.services.nginx.serviceConfig.ProtectHome = &quot;read-only&quot;; 1082 1082 } ··· 1093 1093 <para> 1094 1094 Replace a <literal>nesting.clone</literal> entry with: 1095 1095 </para> 1096 - <programlisting language="bash"> 1096 + <programlisting language="nix"> 1097 1097 { 1098 1098 specialisation.example-sub-configuration = { 1099 1099 configuration = { ··· 1104 1104 <para> 1105 1105 Replace a <literal>nesting.children</literal> entry with: 1106 1106 </para> 1107 - <programlisting language="bash"> 1107 + <programlisting language="nix"> 1108 1108 { 1109 1109 specialisation.example-sub-configuration = { 1110 1110 inheritParentConfig = false; ··· 1385 1385 multi-instance config with an existing bitcoind data directory 1386 1386 and user, you have to adjust the original config, e.g.: 1387 1387 </para> 1388 - <programlisting language="bash"> 1388 + <programlisting language="nix"> 1389 1389 { 1390 1390 services.bitcoind = { 1391 1391 enable = true; ··· 1397 1397 <para> 1398 1398 To something similar: 1399 1399 </para> 1400 - <programlisting language="bash"> 1400 + <programlisting language="nix"> 1401 1401 { 1402 1402 services.bitcoind.mainnet = { 1403 1403 enable = true; ··· 1447 1447 the original SSL settings, you have to adjust the original 1448 1448 config, e.g.: 1449 1449 </para> 1450 - <programlisting language="bash"> 1450 + <programlisting language="nix"> 1451 1451 { 1452 1452 services.dokuwiki = { 1453 1453 enable = true; ··· 1458 1458 <para> 1459 1459 To something similar: 1460 1460 </para> 1461 - <programlisting language="bash"> 1461 + <programlisting language="nix"> 1462 1462 { 1463 1463 services.dokuwiki.&quot;mywiki&quot; = { 1464 1464 enable = true; ··· 1492 1492 option is (<literal>/var/db/postgresql</literal>) and then 1493 1493 explicitly set this value to maintain compatibility: 1494 1494 </para> 1495 - <programlisting language="bash"> 1495 + <programlisting language="nix"> 1496 1496 { 1497 1497 services.postgresql.dataDir = &quot;/var/db/postgresql&quot;; 1498 1498 } ··· 1825 1825 you must include those directories into the 1826 1826 <literal>BindPaths</literal> of the service: 1827 1827 </para> 1828 - <programlisting language="bash"> 1828 + <programlisting language="nix"> 1829 1829 { 1830 1830 systemd.services.transmission.serviceConfig.BindPaths = [ &quot;/path/to/alternative/download-dir&quot; ]; 1831 1831 } ··· 1835 1835 <literal>transmission-daemon</literal> is now only available 1836 1836 on the local network interface by default. Use: 1837 1837 </para> 1838 - <programlisting language="bash"> 1838 + <programlisting language="nix"> 1839 1839 { 1840 1840 services.transmission.settings.rpc-bind-address = &quot;0.0.0.0&quot;; 1841 1841 } ··· 1900 1900 <para> 1901 1901 This means that a configuration like this 1902 1902 </para> 1903 - <programlisting language="bash"> 1903 + <programlisting language="nix"> 1904 1904 { 1905 1905 services.dovecot2.mailboxes = [ 1906 1906 { name = &quot;Junk&quot;; ··· 1912 1912 <para> 1913 1913 should now look like this: 1914 1914 </para> 1915 - <programlisting language="bash"> 1915 + <programlisting language="nix"> 1916 1916 { 1917 1917 services.dovecot2.mailboxes = { 1918 1918 Junk.auto = &quot;create&quot;;
+9 -9
nixos/doc/manual/from_md/release-notes/rl-2105.section.xml
··· 330 330 <literal>mediatomb</literal> package. If you want to keep the 331 331 old behavior, you must declare it with: 332 332 </para> 333 - <programlisting language="bash"> 333 + <programlisting language="nix"> 334 334 { 335 335 services.mediatomb.package = pkgs.mediatomb; 336 336 } ··· 341 341 service declaration to add the firewall rules itself before, 342 342 you should now declare it with: 343 343 </para> 344 - <programlisting language="bash"> 344 + <programlisting language="nix"> 345 345 { 346 346 services.mediatomb.openFirewall = true; 347 347 } ··· 368 368 <link xlink:href="options.html#opt-services.uwsgi.capabilities">services.uwsgi.capabilities</link>. 369 369 The previous behaviour can be restored by setting: 370 370 </para> 371 - <programlisting language="bash"> 371 + <programlisting language="nix"> 372 372 { 373 373 services.uwsgi.user = &quot;root&quot;; 374 374 services.uwsgi.group = &quot;root&quot;; ··· 552 552 has been removed. To enable Privoxy, and to configure it to 553 553 use Tor’s faster port, use the following configuration: 554 554 </para> 555 - <programlisting language="bash"> 555 + <programlisting language="nix"> 556 556 { 557 557 opt-services.privoxy.enable = true; 558 558 opt-services.privoxy.enableTor = true; ··· 689 689 <literal>mpich</literal> instead of the default 690 690 <literal>openmpi</literal> can now be achived like this: 691 691 </para> 692 - <programlisting language="bash"> 692 + <programlisting language="nix"> 693 693 self: super: 694 694 { 695 695 mpi = super.mpich; ··· 850 850 kodiPackages.inputstream-adaptive and kodiPackages.vfs-sftp 851 851 addons: 852 852 </para> 853 - <programlisting language="bash"> 853 + <programlisting language="nix"> 854 854 { 855 855 environment.systemPackages = [ 856 856 pkgs.kodi ··· 867 867 and as a result the above configuration should now be written 868 868 as: 869 869 </para> 870 - <programlisting language="bash"> 870 + <programlisting language="nix"> 871 871 { 872 872 environment.systemPackages = [ 873 873 (pkgs.kodi.withPackages (p: with p; [ ··· 1158 1158 users to declare autoscan media directories from their nixos 1159 1159 configuration: 1160 1160 </para> 1161 - <programlisting language="bash"> 1161 + <programlisting language="nix"> 1162 1162 { 1163 1163 services.mediatomb.mediaDirectories = [ 1164 1164 { path = &quot;/var/lib/mediatomb/pictures&quot;; recursive = false; hidden-files = false; } ··· 1519 1519 been dropped. Users that still want it should add the 1520 1520 following to their system configuration: 1521 1521 </para> 1522 - <programlisting language="bash"> 1522 + <programlisting language="nix"> 1523 1523 { 1524 1524 services.gvfs.package = pkgs.gvfs.override { samba = null; }; 1525 1525 }
+3 -3
nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
··· 642 642 </para> 643 643 </listitem> 644 644 </itemizedlist> 645 - <programlisting language="bash"> 645 + <programlisting language="nix"> 646 646 { 647 647 services.paperless-ng.extraConfig = { 648 648 # Provide languages as ISO 639-2 codes ··· 737 737 insecure. Out-of-tree modules are likely to require 738 738 adaptation: instead of 739 739 </para> 740 - <programlisting language="bash"> 740 + <programlisting language="nix"> 741 741 { 742 742 users.users.foo = { 743 743 isSystemUser = true; ··· 747 747 <para> 748 748 also create a group for your user: 749 749 </para> 750 - <programlisting language="bash"> 750 + <programlisting language="nix"> 751 751 { 752 752 users.users.foo = { 753 753 isSystemUser = true;
+6 -6
nixos/doc/manual/from_md/release-notes/rl-2205.section.xml
··· 714 714 <literal>programs.msmtp.*</literal> can be used instead for an 715 715 equivalent setup. For example: 716 716 </para> 717 - <programlisting language="bash"> 717 + <programlisting language="nix"> 718 718 { 719 719 # Original ssmtp configuration: 720 720 services.ssmtp = { ··· 847 847 <literal>config.nixpkgs.config.allowUnfree</literal> are 848 848 enabled. If you still want these fonts, use: 849 849 </para> 850 - <programlisting language="bash"> 850 + <programlisting language="nix"> 851 851 { 852 852 fonts.fonts = [ 853 853 pkgs.xorg.fontbhlucidatypewriter100dpi ··· 942 942 <para> 943 943 Before: 944 944 </para> 945 - <programlisting language="bash"> 945 + <programlisting language="nix"> 946 946 { 947 947 services.matrix-synapse = { 948 948 enable = true; ··· 977 977 <para> 978 978 After: 979 979 </para> 980 - <programlisting language="bash"> 980 + <programlisting language="nix"> 981 981 { 982 982 services.matrix-synapse = { 983 983 enable = true; ··· 1143 1143 <para> 1144 1144 Before: 1145 1145 </para> 1146 - <programlisting language="bash"> 1146 + <programlisting language="nix"> 1147 1147 services.keycloak = { 1148 1148 enable = true; 1149 1149 httpPort = &quot;8080&quot;; ··· 1157 1157 <para> 1158 1158 After: 1159 1159 </para> 1160 - <programlisting language="bash"> 1160 + <programlisting language="nix"> 1161 1161 services.keycloak = { 1162 1162 enable = true; 1163 1163 settings = {
+2 -2
nixos/doc/manual/from_md/release-notes/rl-2211.section.xml
··· 1082 1082 removed. This option was an association of environment 1083 1083 variables for Grafana. If you had an expression like 1084 1084 </para> 1085 - <programlisting language="bash"> 1085 + <programlisting language="nix"> 1086 1086 { 1087 1087 services.grafana.extraOptions.SECURITY_ADMIN_USER = &quot;foobar&quot;; 1088 1088 } ··· 1096 1096 For the migration, it is recommended to turn it into the 1097 1097 INI format, i.e. to declare 1098 1098 </para> 1099 - <programlisting language="bash"> 1099 + <programlisting language="nix"> 1100 1100 { 1101 1101 services.grafana.settings.security.admin_user = &quot;foobar&quot;; 1102 1102 }
+1 -1
nixos/doc/manual/md-to-db.sh
··· 1 1 #! /usr/bin/env nix-shell 2 - #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/21.11 -i bash -p pandoc 2 + #! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/tarball/22.11 -i bash -p pandoc 3 3 4 4 # This script is temporarily needed while we transition the manual to 5 5 # CommonMark. It converts the .md files in the regular manual folder