diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-10-29 08:02:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-29 08:02:35 +0100 |
commit | 8b385c91c3b16e4f6afe3765bc7b58187391f08e (patch) | |
tree | c9cada060d2315478a2de8381ee47c637a3d9277 /nixos/doc/manual/development | |
parent | 6dd28903028f0c12f2714cfb85a54779183adacd (diff) | |
parent | e8bed1eec973d79a5af23a9530729e89cb8196e9 (diff) | |
download | nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.tar nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.tar.gz nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.tar.bz2 nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.tar.lz nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.tar.xz nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.tar.zst nixpkgs-8b385c91c3b16e4f6afe3765bc7b58187391f08e.zip |
Merge pull request #263462 from nikstur/rebuildable-system
Rebuildable system & appliance
Diffstat (limited to 'nixos/doc/manual/development')
-rw-r--r-- | nixos/doc/manual/development/non-switchable-systems.section.md | 21 | ||||
-rw-r--r-- | nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md | 1 |
2 files changed, 22 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 ``` |