···11+# Non Switchable Systems {#sec-non-switchable-system}
22+33+In certain systems, most notably image based appliances, updates are handled
44+outside the system. This means that you do not need to rebuild your
55+configuration on the system itself anymore.
66+77+If you want to build such a system, you can use the `image-based-appliance`
88+profile:
99+1010+```nix
1111+{ modulesPath, ... }: {
1212+ imports = [ "${modulesPath}/profiles/image-based-appliance.nix" ]
1313+}
1414+```
1515+1616+The most notable deviation of this profile from a standard NixOS configuration
1717+is that after building it, you cannot switch *to* the configuration anymore.
1818+The profile sets `config.system.switch.enable = false;`, which excludes
1919+`switch-to-configuration`, the central script called by `nixos-rebuild`, from
2020+your system. Removing this script makes the image lighter and slightly more
2121+secure.
···345345346346## Other Notable Changes {#sec-release-23.11-notable-changes}
347347348348+- A new option `system.switch.enable` was added. By default, this is option is
349349+ enabled. Disabling it makes the system unable to be reconfigured via
350350+ `nixos-rebuild`. This is good for image based appliances where updates are
351351+ handled outside the image.
352352+348353- 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.
349354350355- 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:
···11+# This profile sets up a sytem for image based appliance usage. An appliance is
22+# installed as an image, cannot be re-built, has no Nix available, and is
33+# generally not meant for interactive use. Updates to such an appliance are
44+# handled by updating whole partition images via a tool like systemd-sysupdate.
55+66+{ lib, modulesPath, ... }:
77+88+{
99+1010+ # Appliances are always "minimal".
1111+ imports = [
1212+ "${modulesPath}/profiles/minimal.nix"
1313+ ];
1414+1515+ # The system cannot be rebuilt.
1616+ nix.enable = false;
1717+ system.switch.enable = false;
1818+1919+ # The system is static.
2020+ users.mutableUsers = false;
2121+2222+ # The system avoids interpreters as much as possible to reduce its attack
2323+ # surface.
2424+ boot.initrd.systemd.enable = lib.mkDefault true;
2525+ networking.useNetworkd = lib.mkDefault true;
2626+}
+9
nixos/modules/profiles/minimal.nix
···18181919 documentation.nixos.enable = mkDefault false;
20202121+ # Perl is a default package.
2222+ environment.defaultPackages = mkDefault [ ];
2323+2424+ # The lessopen package pulls in Perl.
2525+ programs.less.lessopen = mkDefault null;
2626+2727+ # This pulls in nixos-containers which depends on Perl.
2828+ boot.enableContainers = mkDefault false;
2929+2130 programs.command-not-found.enable = mkDefault false;
22312332 services.logrotate.enable = mkDefault false;