summaryrefslogtreecommitdiffstats
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/default.nix35
-rw-r--r--nixos/doc/manual/development/option-declarations.section.md6
-rw-r--r--nixos/doc/manual/development/running-nixos-tests-interactively.section.md33
-rw-r--r--nixos/doc/manual/from_md/development/option-declarations.section.xml6
-rw-r--r--nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml40
-rw-r--r--nixos/doc/manual/from_md/release-notes/rl-2305.section.xml186
-rw-r--r--nixos/doc/manual/man-nixos-rebuild.xml6
-rw-r--r--nixos/doc/manual/release-notes/rl-2305.section.md41
-rw-r--r--nixos/lib/make-options-doc/default.nix99
-rw-r--r--nixos/lib/make-options-doc/mergeJSON.py231
-rw-r--r--nixos/lib/make-options-doc/options-to-docbook.xsl202
-rw-r--r--nixos/lib/make-options-doc/optionsJSONtoXML.nix6
-rw-r--r--nixos/lib/make-options-doc/optionsToDocbook.py343
-rw-r--r--nixos/lib/make-options-doc/sortXML.py27
-rw-r--r--nixos/lib/test-driver/default.nix2
-rw-r--r--nixos/lib/test-driver/test_driver/machine.py25
-rw-r--r--nixos/lib/testing/driver.nix4
-rw-r--r--nixos/lib/testing/network.nix41
-rw-r--r--nixos/lib/testing/testScript.nix2
-rw-r--r--nixos/modules/config/mysql.nix2
-rw-r--r--nixos/modules/config/no-x-libs.nix13
-rw-r--r--nixos/modules/config/users-groups.nix4
-rw-r--r--nixos/modules/i18n/input-method/kime.nix68
-rw-r--r--nixos/modules/installer/cd-dvd/channel.nix2
-rw-r--r--nixos/modules/installer/cd-dvd/installation-cd-minimal.nix4
-rw-r--r--nixos/modules/installer/tools/nix-fallback-paths.nix10
-rwxr-xr-xnixos/modules/installer/tools/nixos-install.sh26
-rw-r--r--nixos/modules/misc/documentation.nix8
-rw-r--r--nixos/modules/module-list.nix4
-rw-r--r--nixos/modules/programs/gnome-documents.nix54
-rw-r--r--nixos/modules/rename.nix2
-rw-r--r--nixos/modules/security/acme/default.nix2
-rw-r--r--nixos/modules/security/audit.nix2
-rw-r--r--nixos/modules/security/systemd-confinement.nix1
-rw-r--r--nixos/modules/services/amqp/activemq/default.nix25
-rw-r--r--nixos/modules/services/audio/mpd.nix2
-rw-r--r--nixos/modules/services/audio/roon-bridge.nix2
-rw-r--r--nixos/modules/services/backup/restic.nix23
-rw-r--r--nixos/modules/services/hardware/fwupd.nix21
-rw-r--r--nixos/modules/services/hardware/throttled.nix6
-rw-r--r--nixos/modules/services/mail/goeland.nix74
-rw-r--r--nixos/modules/services/misc/autosuspend.nix230
-rw-r--r--nixos/modules/services/misc/gitea.nix2
-rw-r--r--nixos/modules/services/misc/gpsd.nix2
-rw-r--r--nixos/modules/services/misc/octoprint.nix3
-rw-r--r--nixos/modules/services/misc/weechat.nix2
-rw-r--r--nixos/modules/services/monitoring/grafana-image-renderer.nix2
-rw-r--r--nixos/modules/services/monitoring/tuptime.nix6
-rw-r--r--nixos/modules/services/monitoring/uptime-kuma.nix4
-rw-r--r--nixos/modules/services/networking/avahi-daemon.nix4
-rw-r--r--nixos/modules/services/networking/blocky.nix1
-rw-r--r--nixos/modules/services/networking/dhcpcd.nix9
-rw-r--r--nixos/modules/services/networking/gnunet.nix4
-rw-r--r--nixos/modules/services/networking/nat.nix2
-rw-r--r--nixos/modules/services/networking/nomad.nix26
-rw-r--r--nixos/modules/services/networking/redsocks.nix3
-rw-r--r--nixos/modules/services/networking/rpcbind.nix2
-rw-r--r--nixos/modules/services/networking/ssh/lshd.nix2
-rw-r--r--nixos/modules/services/networking/tmate-ssh-server.nix2
-rw-r--r--nixos/modules/services/security/fail2ban.nix4
-rw-r--r--nixos/modules/services/torrent/magnetico.nix2
-rw-r--r--nixos/modules/services/web-apps/cloudlog.nix502
-rw-r--r--nixos/modules/services/web-apps/dokuwiki.nix26
-rw-r--r--nixos/modules/services/web-apps/hedgedoc.nix8
-rw-r--r--nixos/modules/services/web-apps/mastodon.nix24
-rw-r--r--nixos/modules/services/web-apps/wordpress.nix63
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix49
-rw-r--r--nixos/modules/services/x11/display-managers/lightdm.nix2
-rw-r--r--nixos/modules/system/boot/loader/init-script/init-script.nix2
-rwxr-xr-xnixos/modules/system/boot/loader/systemd-boot/systemd-boot-builder.py50
-rw-r--r--nixos/modules/system/boot/modprobe.nix2
-rw-r--r--nixos/modules/system/boot/systemd/initrd.nix8
-rw-r--r--nixos/modules/tasks/filesystems/envfs.nix2
-rw-r--r--nixos/modules/virtualisation/oci-containers.nix5
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix36
-rw-r--r--nixos/tests/all-tests.nix2
-rw-r--r--nixos/tests/ceph-single-node.nix11
-rw-r--r--nixos/tests/cloudlog.nix18
-rw-r--r--nixos/tests/dokuwiki.nix8
-rw-r--r--nixos/tests/installed-tests/fwupd.nix2
-rw-r--r--nixos/tests/installer.nix2
-rw-r--r--nixos/tests/kernel-generic.nix1
-rw-r--r--nixos/tests/networking.nix134
-rw-r--r--nixos/tests/nextcloud/default.nix2
-rw-r--r--nixos/tests/nginx.nix2
-rw-r--r--nixos/tests/octoprint.nix61
-rw-r--r--nixos/tests/pantheon.nix11
-rw-r--r--nixos/tests/restic.nix45
-rw-r--r--nixos/tests/stratis/simple.nix2
-rw-r--r--nixos/tests/systemd-boot.nix4
-rw-r--r--nixos/tests/tracee.nix2
91 files changed, 2117 insertions, 971 deletions
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 9b72e840f4b1..0ddb3fa7fbe9 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -176,40 +176,10 @@ let
lintrng $out/man-pages-combined.xml
'';
- olinkDB = runCommand "manual-olinkdb"
- { inherit sources;
- nativeBuildInputs = [ buildPackages.libxml2.bin buildPackages.libxslt.bin ];
- }
- ''
- xsltproc \
- ${manualXsltprocOptions} \
- --stringparam collect.xref.targets only \
- --stringparam targets.filename "$out/manual.db" \
- --nonet \
- ${docbook_xsl_ns}/xml/xsl/docbook/xhtml/chunktoc.xsl \
- ${manual-combined}/manual-combined.xml
-
- cat > "$out/olinkdb.xml" <<EOF
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE targetset SYSTEM
- "file://${docbook_xsl_ns}/xml/xsl/docbook/common/targetdatabase.dtd" [
- <!ENTITY manualtargets SYSTEM "file://$out/manual.db">
- ]>
- <targetset>
- <targetsetinfo>
- Allows for cross-referencing olinks between the manpages
- and manual.
- </targetsetinfo>
-
- <document targetdoc="manual">&manualtargets;</document>
- </targetset>
- EOF
- '';
-
in rec {
inherit generatedSources;
- inherit (optionsDoc) optionsJSON optionsNix optionsDocBook;
+ inherit (optionsDoc) optionsJSON optionsNix optionsDocBook optionsUsedDocbook;
# Generate the NixOS manual.
manualHTML = runCommand "nixos-manual-html"
@@ -224,7 +194,6 @@ in rec {
mkdir -p $dst
xsltproc \
${manualXsltprocOptions} \
- --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
--stringparam id.warnings "1" \
--nonet --output $dst/ \
${docbook_xsl_ns}/xml/xsl/docbook/xhtml/chunktoc.xsl \
@@ -261,7 +230,6 @@ in rec {
xsltproc \
${manualXsltprocOptions} \
- --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
--nonet --xinclude --output $dst/epub/ \
${docbook_xsl_ns}/xml/xsl/docbook/epub/docbook.xsl \
${manual-combined}/manual-combined.xml
@@ -295,7 +263,6 @@ in rec {
--param man.output.base.dir "'$out/share/man/'" \
--param man.endnotes.are.numbered 0 \
--param man.break.after.slash 1 \
- --stringparam target.database.document "${olinkDB}/olinkdb.xml" \
${docbook_xsl_ns}/xml/xsl/docbook/manpages/docbook.xsl \
${manual-combined}/man-pages-combined.xml
'';
diff --git a/nixos/doc/manual/development/option-declarations.section.md b/nixos/doc/manual/development/option-declarations.section.md
index aa747f47c9c8..18ec7ba903a9 100644
--- a/nixos/doc/manual/development/option-declarations.section.md
+++ b/nixos/doc/manual/development/option-declarations.section.md
@@ -78,7 +78,7 @@ For example:
::: {#ex-options-declarations-util-mkEnableOption-magic .example}
```nix
-lib.mkEnableOption "magic"
+lib.mkEnableOption (lib.mdDoc "magic")
# is like
lib.mkOption {
type = lib.types.bool;
@@ -113,7 +113,7 @@ Examples:
::: {#ex-options-declarations-util-mkPackageOption-hello .example}
```nix
-lib.mkPackageOption pkgs "hello" { }
+lib.mkPackageOptionMD pkgs "hello" { }
# is like
lib.mkOption {
type = lib.types.package;
@@ -125,7 +125,7 @@ lib.mkOption {
::: {#ex-options-declarations-util-mkPackageOption-ghc .example}
```nix
-lib.mkPackageOption pkgs "GHC" {
+lib.mkPackageOptionMD pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md
index 1130672cb376..54002941d634 100644
--- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md
+++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md
@@ -24,6 +24,39 @@ back into the test driver command line upon its completion. This allows
you to inspect the state of the VMs after the test (e.g. to debug the
test script).
+## Shell access in interactive mode {#sec-nixos-test-shell-access}
+
+The function `<yourmachine>.shell_interact()` grants access to a shell running
+inside a virtual machine. To use it, replace `<yourmachine>` with the name of a
+virtual machine defined in the test, for example: `machine.shell_interact()`.
+Keep in mind that this shell may not display everything correctly as it is
+running within an interactive Python REPL, and logging output from the virtual
+machine may overwrite input and output from the guest shell:
+
+```py
+>>> machine.shell_interact()
+machine: Terminal is ready (there is no initial prompt):
+$ hostname
+machine
+```
+
+As an alternative, you can proxy the guest shell to a local TCP server by first
+starting a TCP server in a terminal using the command:
+
+```ShellSession
+$ socat 'READLINE,PROMPT=$ ' tcp-listen:4444,reuseaddr`
+```
+
+In the terminal where the test driver is running, connect to this server by
+using:
+
+```py
+>>> machine.shell_interact("tcp:127.0.0.1:4444")
+```
+
+Once the connection is established, you can enter commands in the socat terminal
+where socat is running.
+
## Reuse VM state {#sec-nixos-test-reuse-vm-state}
You can re-use the VM states coming from a previous run by setting the
diff --git a/nixos/doc/manual/from_md/development/option-declarations.section.xml b/nixos/doc/manual/from_md/development/option-declarations.section.xml
index cc4893939c28..af05e61363e4 100644
--- a/nixos/doc/manual/from_md/development/option-declarations.section.xml
+++ b/nixos/doc/manual/from_md/development/option-declarations.section.xml
@@ -128,7 +128,7 @@ options = {
</para>
<anchor xml:id="ex-options-declarations-util-mkEnableOption-magic" />
<programlisting language="nix">
-lib.mkEnableOption &quot;magic&quot;
+lib.mkEnableOption (lib.mdDoc &quot;magic&quot;)
# is like
lib.mkOption {
type = lib.types.bool;
@@ -188,7 +188,7 @@ mkPackageOption pkgs &quot;name&quot; { default = [ &quot;path&quot; &quot;in&qu
</para>
<anchor xml:id="ex-options-declarations-util-mkPackageOption-hello" />
<programlisting language="nix">
-lib.mkPackageOption pkgs &quot;hello&quot; { }
+lib.mkPackageOptionMD pkgs &quot;hello&quot; { }
# is like
lib.mkOption {
type = lib.types.package;
@@ -199,7 +199,7 @@ lib.mkOption {
</programlisting>