summary refs log tree commit diff
path: root/nixos/doc
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-10-29 12:00:57 +0000
committerGitHub <noreply@github.com>2023-10-29 12:00:57 +0000
commit571f1df5e41d4aeab9f36c76ada75968c940b388 (patch)
tree460309d4c12f08f3b4ff34dc5389f9dddc84c6c7 /nixos/doc
parent72e667204b6dc29bb53ae9a235d0f5a47b81c36b (diff)
parent0891a9099b4f6013cbe201d81558f8ad528fa3ef (diff)
downloadnixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.tar
nixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.tar.gz
nixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.tar.bz2
nixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.tar.lz
nixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.tar.xz
nixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.tar.zst
nixpkgs-571f1df5e41d4aeab9f36c76ada75968c940b388.zip
Merge master into staging-next
Diffstat (limited to 'nixos/doc')
-rw-r--r--nixos/doc/manual/development/non-switchable-systems.section.md21
-rw-r--r--nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md1
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md5
3 files changed, 27 insertions, 0 deletions
diff --git a/nixos/doc/manual/development/non-switchable-systems.section.md b/nixos/doc/manual/development/non-switchable-systems.section.md
new file mode 100644
index 00000000000..87bb46c7890
--- /dev/null
+++ b/nixos/doc/manual/development/non-switchable-systems.section.md
@@ -0,0 +1,21 @@
+# Non Switchable Systems {#sec-non-switchable-system}
+
+In certain systems, most notably image based appliances, updates are handled
+outside the system. This means that you do not need to rebuild your
+configuration on the system itself anymore.
+
+If you want to build such a system, you can use the `image-based-appliance`
+profile:
+
+```nix
+{ modulesPath, ... }: {
+  imports = [ "${modulesPath}/profiles/image-based-appliance.nix" ]
+}
+```
+
+The most notable deviation of this profile from a standard NixOS configuration
+is that after building it, you cannot switch *to* the configuration anymore.
+The profile sets `config.system.switch.enable = false;`, which excludes
+`switch-to-configuration`, the central script called by `nixos-rebuild`, from
+your system. Removing this script makes the image lighter and slightly more
+secure.
diff --git a/nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md b/nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md
index 82522b33740..ccadb819e06 100644
--- a/nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md
+++ b/nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md
@@ -55,4 +55,5 @@ explained in the next sections.
 ```{=include=} sections
 unit-handling.section.md
 activation-script.section.md
+non-switchable-systems.section.md
 ```
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index e0e9836aaf2..1568e046d13 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -357,6 +357,11 @@
 
 ## Other Notable Changes {#sec-release-23.11-notable-changes}
 
+- A new option `system.switch.enable` was added. By default, this is option is
+  enabled. Disabling it makes the system unable to be reconfigured via
+  `nixos-rebuild`. This is good for image based appliances where updates are
+  handled outside the image.
+
 - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration.
 
 - GNOME, Pantheon, Cinnamon module no longer forces Qt applications to use Adwaita style since it was buggy and is no longer maintained upstream (specifically, Cinnamon now defaults to the gtk2 style instead, following the default in Linux Mint). If you still want it, you can add the following options to your configuration but it will probably be eventually removed: