···21approach, containers are configured and updated independently from the
22host system.
2324-```{=docbook}
25-<xi:include href="imperative-containers.section.xml" />
26-<xi:include href="declarative-containers.section.xml" />
27-<xi:include href="container-networking.section.xml" />
28```
···21approach, containers are configured and updated independently from the
22host system.
2324+```{=include=} sections
25+imperative-containers.section.md
26+declarative-containers.section.md
27+container-networking.section.md
28```
+14
nixos/doc/manual/administration/running.md
···00000000000000
···1+# Administration {#ch-running}
2+3+This chapter describes various aspects of managing a running NixOS system, such as how to use the {command}`systemd` service manager.
4+5+```{=include=} chapters
6+service-mgmt.chapter.md
7+rebooting.chapter.md
8+user-sessions.chapter.md
9+control-groups.chapter.md
10+logging.chapter.md
11+cleaning-store.chapter.md
12+containers.chapter.md
13+troubleshooting.chapter.md
14+```
-21
nixos/doc/manual/administration/running.xml
···1-<part xmlns="http://docbook.org/ns/docbook"
2- xmlns:xlink="http://www.w3.org/1999/xlink"
3- xmlns:xi="http://www.w3.org/2001/XInclude"
4- version="5.0"
5- xml:id="ch-running">
6- <title>Administration</title>
7- <partintro xml:id="ch-running-intro">
8- <para>
9- This chapter describes various aspects of managing a running NixOS system,
10- such as how to use the <command>systemd</command> service manager.
11- </para>
12- </partintro>
13- <xi:include href="../from_md/administration/service-mgmt.chapter.xml" />
14- <xi:include href="../from_md/administration/rebooting.chapter.xml" />
15- <xi:include href="../from_md/administration/user-sessions.chapter.xml" />
16- <xi:include href="../from_md/administration/control-groups.chapter.xml" />
17- <xi:include href="../from_md/administration/logging.chapter.xml" />
18- <xi:include href="../from_md/administration/cleaning-store.chapter.xml" />
19- <xi:include href="../from_md/administration/containers.chapter.xml" />
20- <xi:include href="../from_md/administration/troubleshooting.chapter.xml" />
21-</part>
···3This chapter describes solutions to common problems you might encounter
4when you manage your NixOS system.
56-```{=docbook}
7-<xi:include href="boot-problems.section.xml" />
8-<xi:include href="maintenance-mode.section.xml" />
9-<xi:include href="rollback.section.xml" />
10-<xi:include href="store-corruption.section.xml" />
11-<xi:include href="network-problems.section.xml" />
12```
···3This chapter describes solutions to common problems you might encounter
4when you manage your NixOS system.
56+```{=include=} sections
7+boot-problems.section.md
8+maintenance-mode.section.md
9+rollback.section.md
10+store-corruption.section.md
11+network-problems.section.md
12```
···11here we give a short overview of the most important constructs useful in
12NixOS configuration files.
1314-```{=docbook}
15-<xi:include href="config-file.section.xml" />
16-<xi:include href="abstractions.section.xml" />
17-<xi:include href="modularity.section.xml" />
18```
···11here we give a short overview of the most important constructs useful in
12NixOS configuration files.
1314+```{=include=} sections
15+config-file.section.md
16+abstractions.section.md
17+modularity.section.md
18```
+27
nixos/doc/manual/configuration/configuration.md
···000000000000000000000000000
···1+# Configuration {#ch-configuration}
2+3+This chapter describes how to configure various aspects of a NixOS machine through the configuration file {file}`/etc/nixos/configuration.nix`. As described in [](#sec-changing-config), changes to this file only take effect after you run {command}`nixos-rebuild`.
4+5+```{=include=} chapters
6+config-syntax.chapter.md
7+package-mgmt.chapter.md
8+user-mgmt.chapter.md
9+file-systems.chapter.md
10+x-windows.chapter.md
11+wayland.chapter.md
12+gpu-accel.chapter.md
13+xfce.chapter.md
14+networking.chapter.md
15+linux-kernel.chapter.md
16+subversion.chapter.md
17+```
18+19+```{=include=} chapters
20+@MODULE_CHAPTERS@
21+```
22+23+```{=include=} chapters
24+profiles.chapter.md
25+kubernetes.chapter.md
26+```
27+<!-- Apache; libvirtd virtualisation -->
-31
nixos/doc/manual/configuration/configuration.xml
···1-<part xmlns="http://docbook.org/ns/docbook"
2- xmlns:xlink="http://www.w3.org/1999/xlink"
3- xmlns:xi="http://www.w3.org/2001/XInclude"
4- version="5.0"
5- xml:id="ch-configuration">
6- <title>Configuration</title>
7- <partintro xml:id="ch-configuration-intro">
8- <para>
9- This chapter describes how to configure various aspects of a NixOS machine
10- through the configuration file
11- <filename>/etc/nixos/configuration.nix</filename>. As described in
12- <xref linkend="sec-changing-config" />, changes to this file only take
13- effect after you run <command>nixos-rebuild</command>.
14- </para>
15- </partintro>
16- <xi:include href="../from_md/configuration/config-syntax.chapter.xml" />
17- <xi:include href="../from_md/configuration/package-mgmt.chapter.xml" />
18- <xi:include href="../from_md/configuration/user-mgmt.chapter.xml" />
19- <xi:include href="../from_md/configuration/file-systems.chapter.xml" />
20- <xi:include href="../from_md/configuration/x-windows.chapter.xml" />
21- <xi:include href="../from_md/configuration/wayland.chapter.xml" />
22- <xi:include href="../from_md/configuration/gpu-accel.chapter.xml" />
23- <xi:include href="../from_md/configuration/xfce.chapter.xml" />
24- <xi:include href="../from_md/configuration/networking.chapter.xml" />
25- <xi:include href="../from_md/configuration/linux-kernel.chapter.xml" />
26- <xi:include href="../from_md/configuration/subversion.chapter.xml" />
27- <xi:include href="../generated/modules.xml" xpointer="xpointer(//section[@id='modules']/*)" />
28- <xi:include href="../from_md/configuration/profiles.chapter.xml" />
29- <xi:include href="../from_md/configuration/kubernetes.chapter.xml" />
30-<!-- Apache; libvirtd virtualisation -->
31-</part>
···40To "uninstall" a package, simply remove it from
41[](#opt-environment.systemPackages) and run `nixos-rebuild switch`.
4243-```{=docbook}
44-<xi:include href="customizing-packages.section.xml" />
45-<xi:include href="adding-custom-packages.section.xml" />
46```
···40To "uninstall" a package, simply remove it from
41[](#opt-environment.systemPackages) and run `nixos-rebuild switch`.
4243+```{=include=} sections
44+customizing-packages.section.md
45+adding-custom-packages.section.md
46```
···12 `nix-env` command. This style allows mixing packages from different
13 Nixpkgs versions. It's the only choice for non-root users.
1415-```{=docbook}
16-<xi:include href="declarative-packages.section.xml" />
17-<xi:include href="ad-hoc-packages.section.xml" />
18```
···12 `nix-env` command. This style allows mixing packages from different
13 Nixpkgs versions. It's the only choice for non-root users.
1415+```{=include=} sections
16+declarative-packages.section.md
17+ad-hoc-packages.section.md
18```
···19What follows is a brief explanation on the purpose and use-case for each
20profile. Detailing each option configured by each one is out of scope.
2122-```{=docbook}
23-<xi:include href="profiles/all-hardware.section.xml" />
24-<xi:include href="profiles/base.section.xml" />
25-<xi:include href="profiles/clone-config.section.xml" />
26-<xi:include href="profiles/demo.section.xml" />
27-<xi:include href="profiles/docker-container.section.xml" />
28-<xi:include href="profiles/graphical.section.xml" />
29-<xi:include href="profiles/hardened.section.xml" />
30-<xi:include href="profiles/headless.section.xml" />
31-<xi:include href="profiles/installation-device.section.xml" />
32-<xi:include href="profiles/minimal.section.xml" />
33-<xi:include href="profiles/qemu-guest.section.xml" />
34```
···19What follows is a brief explanation on the purpose and use-case for each
20profile. Detailing each option configured by each one is out of scope.
2122+```{=include=} sections
23+profiles/all-hardware.section.md
24+profiles/base.section.md
25+profiles/clone-config.section.md
26+profiles/demo.section.md
27+profiles/docker-container.section.md
28+profiles/graphical.section.md
29+profiles/hardened.section.md
30+profiles/headless.section.md
31+profiles/installation-device.section.md
32+profiles/minimal.section.md
33+profiles/qemu-guest.section.md
34```
···1+# Development {#ch-development}
2+3+This chapter describes how you can modify and extend NixOS.
4+5+```{=include=} chapters
6+sources.chapter.md
7+writing-modules.chapter.md
8+building-parts.chapter.md
9+bootspec.chapter.md
10+what-happens-during-a-system-switch.chapter.md
11+writing-documentation.chapter.md
12+nixos-tests.chapter.md
13+testing-installer.chapter.md
14+```
···5(using Nix) by a testing framework that automatically starts one or more
6virtual machines containing the NixOS system(s) required for the test.
78-```{=docbook}
9-<xi:include href="writing-nixos-tests.section.xml" />
10-<xi:include href="running-nixos-tests.section.xml" />
11-<xi:include href="running-nixos-tests-interactively.section.xml" />
12-<xi:include href="linking-nixos-tests-to-packages.section.xml" />
13```
···5(using Nix) by a testing framework that automatically starts one or more
6virtual machines containing the NixOS system(s) required for the test.
78+```{=include=} sections
9+writing-nixos-tests.section.md
10+running-nixos-tests.section.md
11+running-nixos-tests-interactively.section.md
12+linking-nixos-tests-to-packages.section.md
13```
···47with our units or the activation script. For this reason, these topics are
48explained in the next sections.
4950-```{=docbook}
51-<xi:include href="unit-handling.section.xml" />
52-<xi:include href="activation-script.section.xml" />
53```
···47with our units or the activation script. For this reason, these topics are
48explained in the next sections.
4950+```{=include=} sections
51+unit-handling.section.md
52+activation-script.section.md
53```
···8384## Adding a Topic to the Book {#sec-writing-docs-adding-a-topic}
8586-Open the parent XML file and add an `xi:include` element to the list of
87chapters with the file name of the topic that you created. If you
88created a `section`, you add the file to the `chapter` file. If you created
89a `chapter`, you add the file to the `part` file.
···8384## Adding a Topic to the Book {#sec-writing-docs-adding-a-topic}
8586+Open the parent CommonMark file and add a line to the list of
87chapters with the file name of the topic that you created. If you
88created a `section`, you add the file to the `chapter` file. If you created
89a `chapter`, you add the file to the `part` file.
···470471The following options can be used when writing tests.
472473-```{=docbook}
474-<xi:include href="../../generated/test-options-db.xml" xpointer="test-options-list"/>
00475```
···470471The following options can be used when writing tests.
472473+```{=include=} options
474+id-prefix: test-opt-
475+list-id: test-options-list
476+source: @NIXOS_TEST_OPTIONS_JSON@
477```
+11
nixos/doc/manual/installation/installation.md
···00000000000
···1+# Installation {#ch-installation}
2+3+This section describes how to obtain, install, and configure NixOS for first-time use.
4+5+```{=include=} chapters
6+obtaining.chapter.md
7+installing.chapter.md
8+changing-config.chapter.md
9+upgrading.chapter.md
10+building-nixos.chapter.md
11+```
···1+# NixOS Manual {#book-nixos-manual}
2+## Version @NIXOS_VERSION@
3+4+<!--
5+ this is the top-level structure file for the nixos manual.
6+7+ the manual structure extends the nixpkgs commonmark further with include
8+ blocks to allow better organization of input text. there are six types of
9+ include blocks: preface, parts, chapters, sections, appendix, and options.
10+ each type except `options`` corresponds to the docbook elements of (roughly)
11+ the same name, and can itself can further include blocks to denote its
12+ substructure.
13+14+ non-`options`` include blocks are fenced code blocks that list a number of
15+ files to include, in the form
16+17+ ```{=include=} <type>
18+ <file-name-1>
19+ <file-name-2>
20+ <...>
21+ ```
22+23+ `options` include blocks do not list file names but contain a list of key-value
24+ pairs that describe the options to be included and how to convert them into
25+ elements of the manual output type:
26+27+ ```{=include=} options
28+ id-prefix: <options id prefix>
29+ list-id: <variable list element id>
30+ source: <path to options.json>
31+ ```
32+33+-->
34+35+```{=include=} preface
36+preface.md
37+```
38+39+```{=include=} parts
40+installation/installation.md
41+configuration/configuration.md
42+administration/running.md
43+development/development.md
44+```
45+46+```{=include=} chapters
47+contributing-to-this-manual.chapter.md
48+```
49+50+```{=include=} appendix
51+nixos-options.md
52+release-notes/release-notes.md
53+```
···1+# Preface {#preface}
2+3+This manual describes how to install, use and extend NixOS, a Linux distribution based on the purely functional package management system [Nix](https://nixos.org/nix), that is composed using modules and packages defined in the [Nixpkgs](https://nixos.org/nixpkgs) project.
4+5+Additional information regarding the Nix package manager and the Nixpkgs project can be found in respectively the [Nix manual](https://nixos.org/nix/manual) and the [Nixpkgs manual](https://nixos.org/nixpkgs/manual).
6+7+If you encounter problems, please report them on the [`Discourse`](https://discourse.nixos.org), the [Matrix room](https://matrix.to/#nix:nixos.org), or on the [`#nixos` channel on Libera.Chat](irc://irc.libera.chat/#nixos). Alternatively, consider [contributing to this manual](#chap-contributing). Bugs should be reported in [NixOS’ GitHub issue tracker](https://github.com/NixOS/nixpkgs/issues).
8+9+::: {.note}
10+Commands prefixed with `#` have to be run as root, either requiring to login as root user or temporarily switching to it using `sudo` for example.
11+:::
-42
nixos/doc/manual/preface.xml
···1-<preface xmlns="http://docbook.org/ns/docbook"
2- xmlns:xlink="http://www.w3.org/1999/xlink"
3- xml:id="preface">
4- <title>Preface</title>
5- <para>
6- This manual describes how to install, use and extend NixOS, a Linux
7- distribution based on the purely functional package management system
8- <link xlink:href="https://nixos.org/nix">Nix</link>, that is composed
9- using modules and packages defined in the
10- <link xlink:href="https://nixos.org/nixpkgs">Nixpkgs</link> project.
11- </para>
12- <para>
13- Additional information regarding the Nix package manager and the Nixpkgs
14- project can be found in respectively the
15- <link xlink:href="https://nixos.org/nix/manual">Nix manual</link> and the
16- <link xlink:href="https://nixos.org/nixpkgs/manual">Nixpkgs manual</link>.
17- </para>
18- <para>
19- If you encounter problems, please report them on the
20- <literal
21- xlink:href="https://discourse.nixos.org">Discourse</literal>,
22- the <link
23- xlink:href="https://matrix.to/#nix:nixos.org">Matrix room</link>,
24- or on the <link
25- xlink:href="irc://irc.libera.chat/#nixos">
26- <literal>#nixos</literal> channel on Libera.Chat</link>.
27- Alternatively, consider <link
28- xlink:href="#chap-contributing">
29- contributing to this manual</link>. Bugs should be
30- reported in
31- <link
32- xlink:href="https://github.com/NixOS/nixpkgs/issues">NixOS’
33- GitHub issue tracker</link>.
34- </para>
35- <note>
36- <para>
37- Commands prefixed with <literal>#</literal> have to be run as root, either
38- requiring to login as root user or temporarily switching to it using
39- <literal>sudo</literal> for example.
40- </para>
41- </note>
42-</preface>
···000000000000000000000000000000000000000000
+25
nixos/doc/manual/release-notes/release-notes.md
···0000000000000000000000000
···1+# Release Notes {#ch-release-notes}
2+3+This section lists the release notes for each stable version of NixOS and current unstable revision.
4+5+```{=include=} sections
6+rl-2305.section.md
7+rl-2211.section.md
8+rl-2205.section.md
9+rl-2111.section.md
10+rl-2105.section.md
11+rl-2009.section.md
12+rl-2003.section.md
13+rl-1909.section.md
14+rl-1903.section.md
15+rl-1809.section.md
16+rl-1803.section.md
17+rl-1709.section.md
18+rl-1703.section.md
19+rl-1609.section.md
20+rl-1603.section.md
21+rl-1509.section.md
22+rl-1412.section.md
23+rl-1404.section.md
24+rl-1310.section.md
25+```
···1-#!/usr/bin/env ruby
2-3-# This script is written intended as a living, evolving tooling
4-# to fix oopsies within the docbook documentation.
5-#
6-# This is *not* a formatter. It, instead, handles some known cases
7-# where something bad happened, and fixing it manually is tedious.
8-#
9-# Read the code to see the different cases it handles.
10-#
11-# ALWAYS `make format` after fixing with this!
12-# ALWAYS read the changes, this tool isn't yet proven to be always right.
13-14-require "rexml/document"
15-include REXML
16-17-if ARGV.length < 1 then
18- $stderr.puts "Needs a filename."
19- exit 1
20-end
21-22-filename = ARGV.shift
23-doc = Document.new(File.open(filename))
24-25-$touched = false
26-27-# Fixing varnames having a sibling element without spacing.
28-# This is to fix an initial `xmlformat` issue where `term`
29-# would mangle as spaces.
30-#
31-# <varlistentry>
32-# <term><varname>types.separatedString</varname><replaceable>sep</replaceable> <----
33-# </term>
34-# ...
35-#
36-# Generates: types.separatedStringsep
37-# ^^^^
38-#
39-# <varlistentry xml:id='fun-makeWrapper'>
40-# <term>
41-# <function>makeWrapper</function><replaceable>executable</replaceable><replaceable>wrapperfile</replaceable><replaceable>args</replaceable> <----
42-# </term>
43-#
44-# Generates: makeWrapperexecutablewrapperfileargs
45-# ^^^^ ^^^^ ^^ ^^
46-#
47-# <term>
48-# <option>--option</option><replaceable>name</replaceable><replaceable>value</replaceable> <-----
49-# </term>
50-#
51-# Generates: --optionnamevalue
52-# ^^ ^^
53-doc.elements.each("//varlistentry/term") do |term|
54- ["varname", "function", "option", "replaceable"].each do |prev_name|
55- term.elements.each(prev_name) do |el|
56- if el.next_element and
57- el.next_element.name == "replaceable" and
58- el.next_sibling_node.class == Element
59- then
60- $touched = true
61- term.insert_after(el, Text.new(" "))
62- end
63- end
64- end
65-end
66-67-68-69-# <cmdsynopsis>
70-# <command>nixos-option</command>
71-# <arg>
72-# <option>-I</option><replaceable>path</replaceable> <------
73-# </arg>
74-#
75-# Generates: -Ipath
76-# ^^
77-doc.elements.each("//cmdsynopsis/arg") do |term|
78- ["option", "replaceable"].each do |prev_name|
79- term.elements.each(prev_name) do |el|
80- if el.next_element and
81- el.next_element.name == "replaceable" and
82- el.next_sibling_node.class == Element
83- then
84- $touched = true
85- term.insert_after(el, Text.new(" "))
86- end
87- end
88- end
89-end
90-91-# <cmdsynopsis>
92-# <arg>
93-# <group choice='req'>
94-# <arg choice='plain'>
95-# <option>--profile-name</option>
96-# </arg>
97-#
98-# <arg choice='plain'>
99-# <option>-p</option>
100-# </arg>
101-# </group><replaceable>name</replaceable> <----
102-# </arg>
103-#
104-# Generates: [{--profile-name | -p }name]
105-# ^^^^
106-doc.elements.each("//cmdsynopsis/arg") do |term|
107- ["group"].each do |prev_name|
108- term.elements.each(prev_name) do |el|
109- if el.next_element and
110- el.next_element.name == "replaceable" and
111- el.next_sibling_node.class == Element
112- then
113- $touched = true
114- term.insert_after(el, Text.new(" "))
115- end
116- end
117- end
118-end
119-120-121-if $touched then
122- doc.context[:attribute_quote] = :quote
123- doc.write(output: File.open(filename, "w"))
124-end
···20 # The websites yt-dlp deals with are a very moving target. That means that
21 # downloads break constantly. Because of that, updates should always be backported
22 # to the latest stable release.
23- version = "2023.1.6";
2425 src = fetchPypi {
26 inherit pname version;
27- sha256 = "sha256-Ong6NnUc7RY2j0CzuoZas5swaJ7YBW8e4jRqo4OaCw8=";
28 };
2930 propagatedBuildInputs = [ brotli certifi mutagen pycryptodomex websockets ];
···20 # The websites yt-dlp deals with are a very moving target. That means that
21 # downloads break constantly. Because of that, updates should always be backported
22 # to the latest stable release.
23+ version = "2023.2.17";
2425 src = fetchPypi {
26 inherit pname version;
27+ sha256 = "sha256-mvkt5e/8GTvbUSFtnr8oh02WGA0gL651Kw2fKmM4Dzo=";
28 };
2930 propagatedBuildInputs = [ brotli certifi mutagen pycryptodomex websockets ];