From 9c1623cbe45600298c152250e2a41342131aa7bd Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Wed, 30 Jun 2021 17:43:06 +0800 Subject: [PATCH 1/2] nixos: nixos/doc/configuration/profiles/*.xml to CommonMark --- nixos/doc/manual/configuration/profiles.xml | 22 ++++++------ .../profiles/all-hardware.section.md | 11 ++++++ .../configuration/profiles/all-hardware.xml | 21 ----------- .../configuration/profiles/base.section.md | 7 ++++ .../manual/configuration/profiles/base.xml | 15 -------- .../profiles/clone-config.section.md | 11 ++++++ .../configuration/profiles/clone-config.xml | 21 ----------- .../configuration/profiles/demo.section.md | 4 +++ .../manual/configuration/profiles/demo.xml | 14 -------- .../profiles/docker-container.section.md | 7 ++++ .../profiles/docker-container.xml | 16 --------- .../profiles/graphical.section.md | 10 ++++++ .../configuration/profiles/graphical.xml | 20 ----------- .../profiles/hardened.section.md | 20 +++++++++++ .../configuration/profiles/hardened.xml | 32 ----------------- .../profiles/headless.section.md | 9 +++++ .../configuration/profiles/headless.xml | 19 ---------- .../profiles/installation-device.section.md | 24 +++++++++++++ .../profiles/installation-device.xml | 36 ------------------- .../configuration/profiles/minimal.section.md | 9 +++++ .../manual/configuration/profiles/minimal.xml | 17 --------- .../profiles/qemu-guest.section.md | 7 ++++ .../configuration/profiles/qemu-guest.xml | 17 --------- .../profiles/all-hardware.section.xml | 16 +++++++++ .../configuration/profiles/base.section.xml | 10 ++++++ .../profiles/clone-config.section.xml | 16 +++++++++ .../configuration/profiles/demo.section.xml | 10 ++++++ .../profiles/docker-container.section.xml | 12 +++++++ .../profiles/graphical.section.xml | 17 +++++++++ .../profiles/hardened.section.xml | 26 ++++++++++++++ .../profiles/headless.section.xml | 18 ++++++++++ .../profiles/installation-device.section.xml | 33 +++++++++++++++++ .../profiles/minimal.section.xml | 15 ++++++++ .../profiles/qemu-guest.section.xml | 11 ++++++ 34 files changed, 314 insertions(+), 239 deletions(-) create mode 100644 nixos/doc/manual/configuration/profiles/all-hardware.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/all-hardware.xml create mode 100644 nixos/doc/manual/configuration/profiles/base.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/base.xml create mode 100644 nixos/doc/manual/configuration/profiles/clone-config.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/clone-config.xml create mode 100644 nixos/doc/manual/configuration/profiles/demo.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/demo.xml create mode 100644 nixos/doc/manual/configuration/profiles/docker-container.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/docker-container.xml create mode 100644 nixos/doc/manual/configuration/profiles/graphical.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/graphical.xml create mode 100644 nixos/doc/manual/configuration/profiles/hardened.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/hardened.xml create mode 100644 nixos/doc/manual/configuration/profiles/headless.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/headless.xml create mode 100644 nixos/doc/manual/configuration/profiles/installation-device.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/installation-device.xml create mode 100644 nixos/doc/manual/configuration/profiles/minimal.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/minimal.xml create mode 100644 nixos/doc/manual/configuration/profiles/qemu-guest.section.md delete mode 100644 nixos/doc/manual/configuration/profiles/qemu-guest.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/base.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/clone-config.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/demo.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/headless.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml create mode 100644 nixos/doc/manual/from_md/configuration/profiles/qemu-guest.section.xml diff --git a/nixos/doc/manual/configuration/profiles.xml b/nixos/doc/manual/configuration/profiles.xml index 9d08f7f7bed2..6994c7e31705 100644 --- a/nixos/doc/manual/configuration/profiles.xml +++ b/nixos/doc/manual/configuration/profiles.xml @@ -25,15 +25,15 @@ What follows is a brief explanation on the purpose and use-case for each profile. Detailing each option configured by each one is out of scope. - - - - - - - - - - - + + + + + + + + + + + diff --git a/nixos/doc/manual/configuration/profiles/all-hardware.section.md b/nixos/doc/manual/configuration/profiles/all-hardware.section.md new file mode 100644 index 000000000000..0344b32c52f9 --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/all-hardware.section.md @@ -0,0 +1,11 @@ +# All Hardware {#sec-profile-all-hardware} + +Enables all hardware supported by NixOS: i.e., all firmware is included, and +all devices from which one may boot are enabled in the initrd. Its primary +use is in the NixOS installation CDs. + +The enabled kernel modules include support for SATA and PATA, SCSI +(partially), USB, Firewire (untested), Virtio (QEMU, KVM, etc.), VMware, and +Hyper-V. Additionally, [`hardware.enableAllFirmware`](options.html#opt-hardware.enableAllFirmware) is +enabled, and the firmware for the ZyDAS ZD1211 chipset is specifically +installed. diff --git a/nixos/doc/manual/configuration/profiles/all-hardware.xml b/nixos/doc/manual/configuration/profiles/all-hardware.xml deleted file mode 100644 index 2936f71069d5..000000000000 --- a/nixos/doc/manual/configuration/profiles/all-hardware.xml +++ /dev/null @@ -1,21 +0,0 @@ -
- All Hardware - - - Enables all hardware supported by NixOS: i.e., all firmware is included, and - all devices from which one may boot are enabled in the initrd. Its primary - use is in the NixOS installation CDs. - - - - The enabled kernel modules include support for SATA and PATA, SCSI - (partially), USB, Firewire (untested), Virtio (QEMU, KVM, etc.), VMware, and - Hyper-V. Additionally, is - enabled, and the firmware for the ZyDAS ZD1211 chipset is specifically - installed. - -
diff --git a/nixos/doc/manual/configuration/profiles/base.section.md b/nixos/doc/manual/configuration/profiles/base.section.md new file mode 100644 index 000000000000..59b3068fda32 --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/base.section.md @@ -0,0 +1,7 @@ +# Base {#sec-profile-base} + +Defines the software packages included in the "minimal" installation CD. It +installs several utilities useful in a simple recovery or install media, such +as a text-mode web browser, and tools for manipulating block devices, +networking, hardware diagnostics, and filesystems (with their respective +kernel modules). diff --git a/nixos/doc/manual/configuration/profiles/base.xml b/nixos/doc/manual/configuration/profiles/base.xml deleted file mode 100644 index b75f6ba25b4f..000000000000 --- a/nixos/doc/manual/configuration/profiles/base.xml +++ /dev/null @@ -1,15 +0,0 @@ -
- Base - - - Defines the software packages included in the "minimal" installation CD. It - installs several utilities useful in a simple recovery or install media, such - as a text-mode web browser, and tools for manipulating block devices, - networking, hardware diagnostics, and filesystems (with their respective - kernel modules). - -
diff --git a/nixos/doc/manual/configuration/profiles/clone-config.section.md b/nixos/doc/manual/configuration/profiles/clone-config.section.md new file mode 100644 index 000000000000..e2583715e517 --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/clone-config.section.md @@ -0,0 +1,11 @@ +# Clone Config {#sec-profile-clone-config} + +This profile is used in installer images. It provides an editable +configuration.nix that imports all the modules that were also used when +creating the image in the first place. As a result it allows users to edit +and rebuild the live-system. + +On images where the installation media also becomes an installation target, +copying over `configuration.nix` should be disabled by +setting `installer.cloneConfig` to `false`. +For example, this is done in `sd-image-aarch64-installer.nix`. diff --git a/nixos/doc/manual/configuration/profiles/clone-config.xml b/nixos/doc/manual/configuration/profiles/clone-config.xml deleted file mode 100644 index 9c70cf352041..000000000000 --- a/nixos/doc/manual/configuration/profiles/clone-config.xml +++ /dev/null @@ -1,21 +0,0 @@ -
- Clone Config - - - This profile is used in installer images. It provides an editable - configuration.nix that imports all the modules that were also used when - creating the image in the first place. As a result it allows users to edit - and rebuild the live-system. - - - - On images where the installation media also becomes an installation target, - copying over configuration.nix should be disabled by - setting installer.cloneConfig to false. - For example, this is done in sd-image-aarch64-installer.nix. - -
diff --git a/nixos/doc/manual/configuration/profiles/demo.section.md b/nixos/doc/manual/configuration/profiles/demo.section.md new file mode 100644 index 000000000000..a50f5a00adad --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/demo.section.md @@ -0,0 +1,4 @@ +# Demo {#sec-profile-demo} + +This profile just enables a `demo` user, with password `demo`, uid `1000`, `wheel` group and +[autologin in the SDDM display manager](options.html#opt-services.xserver.displayManager.autoLogin). diff --git a/nixos/doc/manual/configuration/profiles/demo.xml b/nixos/doc/manual/configuration/profiles/demo.xml deleted file mode 100644 index bc801bb3dc5b..000000000000 --- a/nixos/doc/manual/configuration/profiles/demo.xml +++ /dev/null @@ -1,14 +0,0 @@ -
- Demo - - - This profile just enables a demo - user, with password demo, uid 1000, - wheel group and - autologin in the SDDM display manager. - -
diff --git a/nixos/doc/manual/configuration/profiles/docker-container.section.md b/nixos/doc/manual/configuration/profiles/docker-container.section.md new file mode 100644 index 000000000000..59954112c30e --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/docker-container.section.md @@ -0,0 +1,7 @@ +# Docker Container {#sec-profile-docker-container} + +This is the profile from which the Docker images are generated. It prepares a +working system by importing the [Minimal](#sec-profile-minimal) and +[Clone Config](#sec-profile-clone-config) profiles, and +setting appropriate configuration options that are useful inside a container +context, like [`boot.isContainer`](options.html#opt-boot.isContainer). diff --git a/nixos/doc/manual/configuration/profiles/docker-container.xml b/nixos/doc/manual/configuration/profiles/docker-container.xml deleted file mode 100644 index efa7b8f24c43..000000000000 --- a/nixos/doc/manual/configuration/profiles/docker-container.xml +++ /dev/null @@ -1,16 +0,0 @@ -
- Docker Container - - - This is the profile from which the Docker images are generated. It prepares a - working system by importing the - Minimal and - Clone Config profiles, and - setting appropriate configuration options that are useful inside a container - context, like . - -
diff --git a/nixos/doc/manual/configuration/profiles/graphical.section.md b/nixos/doc/manual/configuration/profiles/graphical.section.md new file mode 100644 index 000000000000..767cde9b79e6 --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/graphical.section.md @@ -0,0 +1,10 @@ +# Graphical {#sec-profile-graphical} + +Defines a NixOS configuration with the Plasma 5 desktop. It's used by the +graphical installation CD. + +It sets [`services.xserver.enable`](options.html#opt-services.xserver.enable), +[`services.xserver.displayManager.sddm.enable`](options.html#opt-services.xserver.displayManager.sddm.enable), +[`services.xserver.desktopManager.plasma5.enable`](options.html#opt-services.xserver.desktopManager.plasma5.enable), +and [`services.xserver.libinput.enable`](options.html#opt-services.xserver.libinput.enable) to true. It also +includes glxinfo and firefox in the system packages list. diff --git a/nixos/doc/manual/configuration/profiles/graphical.xml b/nixos/doc/manual/configuration/profiles/graphical.xml deleted file mode 100644 index cc6d0825d241..000000000000 --- a/nixos/doc/manual/configuration/profiles/graphical.xml +++ /dev/null @@ -1,20 +0,0 @@ -
- Graphical - - - Defines a NixOS configuration with the Plasma 5 desktop. It's used by the - graphical installation CD. - - - - It sets , - , - , and - to true. It also - includes glxinfo and firefox in the system packages list. - -
diff --git a/nixos/doc/manual/configuration/profiles/hardened.section.md b/nixos/doc/manual/configuration/profiles/hardened.section.md new file mode 100644 index 000000000000..958da94d261b --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/hardened.section.md @@ -0,0 +1,20 @@ +# Hardened {#sec-profile-hardened} + +A profile with most (vanilla) hardening options enabled by default, +potentially at the cost of stability, features and performance. + +This includes a hardened kernel, and limiting the system information +available to processes through the `/sys` and +`/proc` filesystems. It also disables the User Namespaces +feature of the kernel, which stops Nix from being able to build anything +(this particular setting can be overriden via +[`security.allowUserNamespaces`](options.html#opt-security.allowUserNamespaces)). See the +[profile source](https://github.com/nixos/nixpkgs/tree/master/nixos/modules/profiles/hardened.nix) +for further detail on which settings are altered. + +::: {.warning} +This profile enables options that are known to affect system +stability. If you experience any stability issues when using the +profile, try disabling it. If you report an issue and use this +profile, always mention that you do. +::: diff --git a/nixos/doc/manual/configuration/profiles/hardened.xml b/nixos/doc/manual/configuration/profiles/hardened.xml deleted file mode 100644 index 4a51754cc7ae..000000000000 --- a/nixos/doc/manual/configuration/profiles/hardened.xml +++ /dev/null @@ -1,32 +0,0 @@ -
- Hardened - - - A profile with most (vanilla) hardening options enabled by default, - potentially at the cost of stability, features and performance. - - - - This includes a hardened kernel, and limiting the system information - available to processes through the /sys and - /proc filesystems. It also disables the User Namespaces - feature of the kernel, which stops Nix from being able to build anything - (this particular setting can be overriden via - ). See the - - profile source for further detail on which settings are altered. - - - - This profile enables options that are known to affect system - stability. If you experience any stability issues when using the - profile, try disabling it. If you report an issue and use this - profile, always mention that you do. - - -
diff --git a/nixos/doc/manual/configuration/profiles/headless.section.md b/nixos/doc/manual/configuration/profiles/headless.section.md new file mode 100644 index 000000000000..1db4a82a4dea --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/headless.section.md @@ -0,0 +1,9 @@ +# Headless {#sec-profile-headless} + +Common configuration for headless machines (e.g., Amazon EC2 instances). + +Disables [sound](options.html#opt-sound.enable), +[vesa](options.html#opt-boot.vesa), serial consoles, +[emergency mode](options.html#opt-systemd.enableEmergencyMode), +[grub splash images](options.html#opt-boot.loader.grub.splashImage) +and configures the kernel to reboot automatically on panic. diff --git a/nixos/doc/manual/configuration/profiles/headless.xml b/nixos/doc/manual/configuration/profiles/headless.xml deleted file mode 100644 index 1b64497ebf7f..000000000000 --- a/nixos/doc/manual/configuration/profiles/headless.xml +++ /dev/null @@ -1,19 +0,0 @@ -
- Headless - - - Common configuration for headless machines (e.g., Amazon EC2 instances). - - - - Disables sound, - vesa, serial consoles, - emergency mode, - grub splash images - and configures the kernel to reboot automatically on panic. - -
diff --git a/nixos/doc/manual/configuration/profiles/installation-device.section.md b/nixos/doc/manual/configuration/profiles/installation-device.section.md new file mode 100644 index 000000000000..aa5678c031a3 --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/installation-device.section.md @@ -0,0 +1,24 @@ +# Installation Device {#sec-profile-installation-device} + +Provides a basic configuration for installation devices like CDs. +This enables redistributable firmware, includes the +[Clone Config profile](#sec-profile-clone-config) +and a copy of the Nixpkgs channel, so `nixos-install` +works out of the box. + +Documentation for [Nixpkgs](options.html#opt-documentation.enable) +and [NixOS](options.html#opt-documentation.nixos.enable) are +forcefully enabled (to override the +[Minimal profile](#sec-profile-minimal) preference); the +NixOS manual is shown automatically on TTY 8, udisks is disabled. +Autologin is enabled as `nixos` user, while passwordless +login as both `root` and `nixos` is possible. +Passwordless `sudo` is enabled too. +[wpa_supplicant](options.html#opt-networking.wireless.enable) is +enabled, but configured to not autostart. + +It is explained how to login, start the ssh server, and if available, +how to start the display manager. + +Several settings are tweaked so that the installer has a better chance of +succeeding under low-memory environments. diff --git a/nixos/doc/manual/configuration/profiles/installation-device.xml b/nixos/doc/manual/configuration/profiles/installation-device.xml deleted file mode 100644 index 192ae955b689..000000000000 --- a/nixos/doc/manual/configuration/profiles/installation-device.xml +++ /dev/null @@ -1,36 +0,0 @@ -
- Installation Device - - - Provides a basic configuration for installation devices like CDs. - This enables redistributable firmware, includes the - Clone Config profile - and a copy of the Nixpkgs channel, so nixos-install - works out of the box. - - - Documentation for Nixpkgs - and NixOS are - forcefully enabled (to override the - Minimal profile preference); the - NixOS manual is shown automatically on TTY 8, udisks is disabled. - Autologin is enabled as nixos user, while passwordless - login as both root and nixos is possible. - Passwordless sudo is enabled too. - wpa_supplicant is - enabled, but configured to not autostart. - - - It is explained how to login, start the ssh server, and if available, - how to start the display manager. - - - - Several settings are tweaked so that the installer has a better chance of - succeeding under low-memory environments. - -
diff --git a/nixos/doc/manual/configuration/profiles/minimal.section.md b/nixos/doc/manual/configuration/profiles/minimal.section.md new file mode 100644 index 000000000000..d5a569d66209 --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/minimal.section.md @@ -0,0 +1,9 @@ +# Minimal {#sec-profile-minimal} + +This profile defines a small NixOS configuration. It does not contain any +graphical stuff. It's a very short file that enables +[noXlibs](options.html#opt-environment.noXlibs), sets +[`i18n.supportedLocales`](options.html#opt-i18n.supportedLocales) to +only support the user-selected locale, +[disables packages' documentation](options.html#opt-documentation.enable), +and [disables sound](options.html#opt-sound.enable). diff --git a/nixos/doc/manual/configuration/profiles/minimal.xml b/nixos/doc/manual/configuration/profiles/minimal.xml deleted file mode 100644 index 179f2d0be64b..000000000000 --- a/nixos/doc/manual/configuration/profiles/minimal.xml +++ /dev/null @@ -1,17 +0,0 @@ -
- Minimal - - - This profile defines a small NixOS configuration. It does not contain any - graphical stuff. It's a very short file that enables - noXlibs, sets - i18n.supportedLocales to - only support the user-selected locale, - disables packages' documentation - , and disables sound. - -
diff --git a/nixos/doc/manual/configuration/profiles/qemu-guest.section.md b/nixos/doc/manual/configuration/profiles/qemu-guest.section.md new file mode 100644 index 000000000000..d7e3cae9cb0f --- /dev/null +++ b/nixos/doc/manual/configuration/profiles/qemu-guest.section.md @@ -0,0 +1,7 @@ +# QEMU Guest {#sec-profile-qemu-guest} + +This profile contains common configuration for virtual machines running under +QEMU (using virtio). + +It makes virtio modules available on the initrd and sets the system time from +the hardware clock to work around a bug in qemu-kvm. diff --git a/nixos/doc/manual/configuration/profiles/qemu-guest.xml b/nixos/doc/manual/configuration/profiles/qemu-guest.xml deleted file mode 100644 index 3ed97b94b510..000000000000 --- a/nixos/doc/manual/configuration/profiles/qemu-guest.xml +++ /dev/null @@ -1,17 +0,0 @@ -
- QEMU Guest - - - This profile contains common configuration for virtual machines running under - QEMU (using virtio). - - - - It makes virtio modules available on the initrd and sets the system time from - the hardware clock to work around a bug in qemu-kvm. - -
diff --git a/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml b/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml new file mode 100644 index 000000000000..e355ffb752d5 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml @@ -0,0 +1,16 @@ +
+ All Hardware + + Enables all hardware supported by NixOS: i.e., all firmware is + included, and all devices from which one may boot are enabled in the + initrd. Its primary use is in the NixOS installation CDs. + + + The enabled kernel modules include support for SATA and PATA, SCSI + (partially), USB, Firewire (untested), Virtio (QEMU, KVM, etc.), + VMware, and Hyper-V. Additionally, + hardware.enableAllFirmware + is enabled, and the firmware for the ZyDAS ZD1211 chipset is + specifically installed. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/base.section.xml b/nixos/doc/manual/from_md/configuration/profiles/base.section.xml new file mode 100644 index 000000000000..83d35bd28676 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/base.section.xml @@ -0,0 +1,10 @@ +
+ Base + + Defines the software packages included in the minimal + installation CD. It installs several utilities useful in a simple + recovery or install media, such as a text-mode web browser, and + tools for manipulating block devices, networking, hardware + diagnostics, and filesystems (with their respective kernel modules). + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/clone-config.section.xml b/nixos/doc/manual/from_md/configuration/profiles/clone-config.section.xml new file mode 100644 index 000000000000..9430b49ea33d --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/clone-config.section.xml @@ -0,0 +1,16 @@ +
+ Clone Config + + This profile is used in installer images. It provides an editable + configuration.nix that imports all the modules that were also used + when creating the image in the first place. As a result it allows + users to edit and rebuild the live-system. + + + On images where the installation media also becomes an installation + target, copying over configuration.nix should be + disabled by setting installer.cloneConfig to + false. For example, this is done in + sd-image-aarch64-installer.nix. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml b/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml new file mode 100644 index 000000000000..8b8c09118d92 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml @@ -0,0 +1,10 @@ +
+ Demo + + This profile just enables a demo user, with + password demo, uid 1000, + wheel group and + autologin + in the SDDM display manager. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml b/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml new file mode 100644 index 000000000000..28dcd2b1a2d4 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml @@ -0,0 +1,12 @@ +
+ Docker Container + + This is the profile from which the Docker images are generated. It + prepares a working system by importing the + Minimal and + Clone Config + profiles, and setting appropriate configuration options that are + useful inside a container context, like + boot.isContainer. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml b/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml new file mode 100644 index 000000000000..644a8ea590bb --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml @@ -0,0 +1,17 @@ +
+ Graphical + + Defines a NixOS configuration with the Plasma 5 desktop. It’s used + by the graphical installation CD. + + + It sets + services.xserver.enable, + services.xserver.displayManager.sddm.enable, + services.xserver.desktopManager.plasma5.enable, + and + services.xserver.libinput.enable + to true. It also includes glxinfo and firefox in the system packages + list. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml b/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml new file mode 100644 index 000000000000..a08bc8432306 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml @@ -0,0 +1,26 @@ +
+ Hardened + + A profile with most (vanilla) hardening options enabled by default, + potentially at the cost of stability, features and performance. + + + This includes a hardened kernel, and limiting the system information + available to processes through the /sys and + /proc filesystems. It also disables the User + Namespaces feature of the kernel, which stops Nix from being able to + build anything (this particular setting can be overriden via + security.allowUserNamespaces). + See the + profile + source for further detail on which settings are altered. + + + + This profile enables options that are known to affect system + stability. If you experience any stability issues when using the + profile, try disabling it. If you report an issue and use this + profile, always mention that you do. + + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml b/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml new file mode 100644 index 000000000000..a89551abd411 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml @@ -0,0 +1,18 @@ +
+ Headless + + Common configuration for headless machines (e.g., Amazon EC2 + instances). + + + Disables + sound, + vesa, serial + consoles, + emergency + mode, + grub + splash images and configures the kernel to reboot + automatically on panic. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml b/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml new file mode 100644 index 000000000000..8a8265c03c03 --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml @@ -0,0 +1,33 @@ +
+ Installation Device + + Provides a basic configuration for installation devices like CDs. + This enables redistributable firmware, includes the + Clone Config profile + and a copy of the Nixpkgs channel, so + nixos-install works out of the box. + + + Documentation for + Nixpkgs + and + NixOS + are forcefully enabled (to override the + Minimal profile + preference); the NixOS manual is shown automatically on TTY 8, + udisks is disabled. Autologin is enabled as nixos + user, while passwordless login as both root and + nixos is possible. Passwordless + sudo is enabled too. + wpa_supplicant + is enabled, but configured to not autostart. + + + It is explained how to login, start the ssh server, and if + available, how to start the display manager. + + + Several settings are tweaked so that the installer has a better + chance of succeeding under low-memory environments. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml b/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml new file mode 100644 index 000000000000..5653b3f01c3f --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml @@ -0,0 +1,15 @@ +
+ Minimal + + This profile defines a small NixOS configuration. It does not + contain any graphical stuff. It’s a very short file that enables + noXlibs, + sets + i18n.supportedLocales + to only support the user-selected locale, + disables + packages’ documentation, and + disables + sound. + +
diff --git a/nixos/doc/manual/from_md/configuration/profiles/qemu-guest.section.xml b/nixos/doc/manual/from_md/configuration/profiles/qemu-guest.section.xml new file mode 100644 index 000000000000..f33464f9db4d --- /dev/null +++ b/nixos/doc/manual/from_md/configuration/profiles/qemu-guest.section.xml @@ -0,0 +1,11 @@ +
+ QEMU Guest + + This profile contains common configuration for virtual machines + running under QEMU (using virtio). + + + It makes virtio modules available on the initrd and sets the system + time from the hardware clock to work around a bug in qemu-kvm. + +
From 227811ac97db3e1b158a91815d0c521e4f56ae20 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sun, 4 Jul 2021 08:42:44 +0800 Subject: [PATCH 2/2] nixos: use only URI fragment in manual options links --- .../configuration/profiles/all-hardware.section.md | 2 +- .../manual/configuration/profiles/demo.section.md | 2 +- .../profiles/docker-container.section.md | 2 +- .../configuration/profiles/graphical.section.md | 8 ++++---- .../configuration/profiles/hardened.section.md | 2 +- .../configuration/profiles/headless.section.md | 8 ++++---- .../profiles/installation-device.section.md | 6 +++--- .../configuration/profiles/minimal.section.md | 8 ++++---- .../configuration/profiles/all-hardware.section.xml | 5 ++--- .../from_md/configuration/profiles/demo.section.xml | 2 +- .../profiles/docker-container.section.xml | 2 +- .../configuration/profiles/graphical.section.xml | 13 +++++-------- .../configuration/profiles/hardened.section.xml | 3 +-- .../configuration/profiles/headless.section.xml | 11 ++++------- .../profiles/installation-device.section.xml | 9 ++++----- .../configuration/profiles/minimal.section.xml | 12 +++++------- 16 files changed, 42 insertions(+), 53 deletions(-) diff --git a/nixos/doc/manual/configuration/profiles/all-hardware.section.md b/nixos/doc/manual/configuration/profiles/all-hardware.section.md index 0344b32c52f9..e2dd7c76089c 100644 --- a/nixos/doc/manual/configuration/profiles/all-hardware.section.md +++ b/nixos/doc/manual/configuration/profiles/all-hardware.section.md @@ -6,6 +6,6 @@ use is in the NixOS installation CDs. The enabled kernel modules include support for SATA and PATA, SCSI (partially), USB, Firewire (untested), Virtio (QEMU, KVM, etc.), VMware, and -Hyper-V. Additionally, [`hardware.enableAllFirmware`](options.html#opt-hardware.enableAllFirmware) is +Hyper-V. Additionally, [](#opt-hardware.enableAllFirmware) is enabled, and the firmware for the ZyDAS ZD1211 chipset is specifically installed. diff --git a/nixos/doc/manual/configuration/profiles/demo.section.md b/nixos/doc/manual/configuration/profiles/demo.section.md index a50f5a00adad..0a0df483c123 100644 --- a/nixos/doc/manual/configuration/profiles/demo.section.md +++ b/nixos/doc/manual/configuration/profiles/demo.section.md @@ -1,4 +1,4 @@ # Demo {#sec-profile-demo} This profile just enables a `demo` user, with password `demo`, uid `1000`, `wheel` group and -[autologin in the SDDM display manager](options.html#opt-services.xserver.displayManager.autoLogin). +[autologin in the SDDM display manager](#opt-services.xserver.displayManager.autoLogin). diff --git a/nixos/doc/manual/configuration/profiles/docker-container.section.md b/nixos/doc/manual/configuration/profiles/docker-container.section.md index 59954112c30e..f3e29b92f5e6 100644 --- a/nixos/doc/manual/configuration/profiles/docker-container.section.md +++ b/nixos/doc/manual/configuration/profiles/docker-container.section.md @@ -4,4 +4,4 @@ This is the profile from which the Docker images are generated. It prepares a working system by importing the [Minimal](#sec-profile-minimal) and [Clone Config](#sec-profile-clone-config) profiles, and setting appropriate configuration options that are useful inside a container -context, like [`boot.isContainer`](options.html#opt-boot.isContainer). +context, like [](#opt-boot.isContainer). diff --git a/nixos/doc/manual/configuration/profiles/graphical.section.md b/nixos/doc/manual/configuration/profiles/graphical.section.md index 767cde9b79e6..aaea5c8c0288 100644 --- a/nixos/doc/manual/configuration/profiles/graphical.section.md +++ b/nixos/doc/manual/configuration/profiles/graphical.section.md @@ -3,8 +3,8 @@ Defines a NixOS configuration with the Plasma 5 desktop. It's used by the graphical installation CD. -It sets [`services.xserver.enable`](options.html#opt-services.xserver.enable), -[`services.xserver.displayManager.sddm.enable`](options.html#opt-services.xserver.displayManager.sddm.enable), -[`services.xserver.desktopManager.plasma5.enable`](options.html#opt-services.xserver.desktopManager.plasma5.enable), -and [`services.xserver.libinput.enable`](options.html#opt-services.xserver.libinput.enable) to true. It also +It sets [](#opt-services.xserver.enable), +[](#opt-services.xserver.displayManager.sddm.enable), +[](#opt-services.xserver.desktopManager.plasma5.enable), +and [](#opt-services.xserver.libinput.enable) to true. It also includes glxinfo and firefox in the system packages list. diff --git a/nixos/doc/manual/configuration/profiles/hardened.section.md b/nixos/doc/manual/configuration/profiles/hardened.section.md index 958da94d261b..9fb5e18c384a 100644 --- a/nixos/doc/manual/configuration/profiles/hardened.section.md +++ b/nixos/doc/manual/configuration/profiles/hardened.section.md @@ -8,7 +8,7 @@ available to processes through the `/sys` and `/proc` filesystems. It also disables the User Namespaces feature of the kernel, which stops Nix from being able to build anything (this particular setting can be overriden via -[`security.allowUserNamespaces`](options.html#opt-security.allowUserNamespaces)). See the +[](#opt-security.allowUserNamespaces)). See the [profile source](https://github.com/nixos/nixpkgs/tree/master/nixos/modules/profiles/hardened.nix) for further detail on which settings are altered. diff --git a/nixos/doc/manual/configuration/profiles/headless.section.md b/nixos/doc/manual/configuration/profiles/headless.section.md index 1db4a82a4dea..d185a9a774b7 100644 --- a/nixos/doc/manual/configuration/profiles/headless.section.md +++ b/nixos/doc/manual/configuration/profiles/headless.section.md @@ -2,8 +2,8 @@ Common configuration for headless machines (e.g., Amazon EC2 instances). -Disables [sound](options.html#opt-sound.enable), -[vesa](options.html#opt-boot.vesa), serial consoles, -[emergency mode](options.html#opt-systemd.enableEmergencyMode), -[grub splash images](options.html#opt-boot.loader.grub.splashImage) +Disables [sound](#opt-sound.enable), +[vesa](#opt-boot.vesa), serial consoles, +[emergency mode](#opt-systemd.enableEmergencyMode), +[grub splash images](#opt-boot.loader.grub.splashImage) and configures the kernel to reboot automatically on panic. diff --git a/nixos/doc/manual/configuration/profiles/installation-device.section.md b/nixos/doc/manual/configuration/profiles/installation-device.section.md index aa5678c031a3..ae9f8fa7757f 100644 --- a/nixos/doc/manual/configuration/profiles/installation-device.section.md +++ b/nixos/doc/manual/configuration/profiles/installation-device.section.md @@ -6,15 +6,15 @@ This enables redistributable firmware, includes the and a copy of the Nixpkgs channel, so `nixos-install` works out of the box. -Documentation for [Nixpkgs](options.html#opt-documentation.enable) -and [NixOS](options.html#opt-documentation.nixos.enable) are +Documentation for [Nixpkgs](#opt-documentation.enable) +and [NixOS](#opt-documentation.nixos.enable) are forcefully enabled (to override the [Minimal profile](#sec-profile-minimal) preference); the NixOS manual is shown automatically on TTY 8, udisks is disabled. Autologin is enabled as `nixos` user, while passwordless login as both `root` and `nixos` is possible. Passwordless `sudo` is enabled too. -[wpa_supplicant](options.html#opt-networking.wireless.enable) is +[wpa_supplicant](#opt-networking.wireless.enable) is enabled, but configured to not autostart. It is explained how to login, start the ssh server, and if available, diff --git a/nixos/doc/manual/configuration/profiles/minimal.section.md b/nixos/doc/manual/configuration/profiles/minimal.section.md index d5a569d66209..02a3b65ae422 100644 --- a/nixos/doc/manual/configuration/profiles/minimal.section.md +++ b/nixos/doc/manual/configuration/profiles/minimal.section.md @@ -2,8 +2,8 @@ This profile defines a small NixOS configuration. It does not contain any graphical stuff. It's a very short file that enables -[noXlibs](options.html#opt-environment.noXlibs), sets -[`i18n.supportedLocales`](options.html#opt-i18n.supportedLocales) to +[noXlibs](#opt-environment.noXlibs), sets +[](#opt-i18n.supportedLocales) to only support the user-selected locale, -[disables packages' documentation](options.html#opt-documentation.enable), -and [disables sound](options.html#opt-sound.enable). +[disables packages' documentation](#opt-documentation.enable), +and [disables sound](#opt-sound.enable). diff --git a/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml b/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml index e355ffb752d5..43ac5edea7f8 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/all-hardware.section.xml @@ -9,8 +9,7 @@ The enabled kernel modules include support for SATA and PATA, SCSI (partially), USB, Firewire (untested), Virtio (QEMU, KVM, etc.), VMware, and Hyper-V. Additionally, - hardware.enableAllFirmware - is enabled, and the firmware for the ZyDAS ZD1211 chipset is - specifically installed. + is enabled, and + the firmware for the ZyDAS ZD1211 chipset is specifically installed. diff --git a/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml b/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml index 8b8c09118d92..09c2680a1067 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/demo.section.xml @@ -4,7 +4,7 @@ This profile just enables a demo user, with password demo, uid 1000, wheel group and - autologin + autologin in the SDDM display manager. diff --git a/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml b/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml index 28dcd2b1a2d4..97c2a92dcab5 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/docker-container.section.xml @@ -7,6 +7,6 @@ Clone Config profiles, and setting appropriate configuration options that are useful inside a container context, like - boot.isContainer. + . diff --git a/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml b/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml index 644a8ea590bb..1b109519d436 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/graphical.section.xml @@ -5,13 +5,10 @@ by the graphical installation CD. - It sets - services.xserver.enable, - services.xserver.displayManager.sddm.enable, - services.xserver.desktopManager.plasma5.enable, - and - services.xserver.libinput.enable - to true. It also includes glxinfo and firefox in the system packages - list. + It sets , + , + , + and to true. + It also includes glxinfo and firefox in the system packages list. diff --git a/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml b/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml index a08bc8432306..44c11786d940 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/hardened.section.xml @@ -10,8 +10,7 @@ /proc filesystems. It also disables the User Namespaces feature of the kernel, which stops Nix from being able to build anything (this particular setting can be overriden via - security.allowUserNamespaces). - See the + ). See the profile source for further detail on which settings are altered. diff --git a/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml b/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml index a89551abd411..0910b9ffaad2 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/headless.section.xml @@ -5,13 +5,10 @@ instances). - Disables - sound, - vesa, serial - consoles, - emergency - mode, - grub + Disables sound, + vesa, serial consoles, + emergency + mode, grub splash images and configures the kernel to reboot automatically on panic. diff --git a/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml b/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml index 8a8265c03c03..837e69df06e1 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/installation-device.section.xml @@ -9,17 +9,16 @@ Documentation for - Nixpkgs - and - NixOS - are forcefully enabled (to override the + Nixpkgs and + NixOS are + forcefully enabled (to override the Minimal profile preference); the NixOS manual is shown automatically on TTY 8, udisks is disabled. Autologin is enabled as nixos user, while passwordless login as both root and nixos is possible. Passwordless sudo is enabled too. - wpa_supplicant + wpa_supplicant is enabled, but configured to not autostart. diff --git a/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml b/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml index 5653b3f01c3f..a3fe30357dff 100644 --- a/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml +++ b/nixos/doc/manual/from_md/configuration/profiles/minimal.section.xml @@ -3,13 +3,11 @@ This profile defines a small NixOS configuration. It does not contain any graphical stuff. It’s a very short file that enables - noXlibs, - sets - i18n.supportedLocales - to only support the user-selected locale, - disables - packages’ documentation, and - disables + noXlibs, sets + to only support the + user-selected locale, + disables packages’ + documentation, and disables sound.