nixpkgs/nixos/doc/manual
Patryk Wychowaniec 2c55eba8f4
nixos: add --specialisation to nixos-rebuild
This commit fixes a papercut in nixos-rebuild where people wanting to
switch to a specialisation (or test one) were forced to manually figure
out the specialisation's path and run its activation script - since now,
there's a dedicated option to do just that.

This is a backwards-compatible change which doesn't affect the existing
behavior, which - to be fair - might still be considered sus by some
people, the painful scenario here being:

- you boot into specialisation `foo`,
- you run `nixos-rebuild switch`,
- whoops, you're no longer at specialisation `foo`, but you're rather
  brought back to the base system.

(it's especially painful for cases where specialisation is used to load
extra drivers, e.g. Nvidia, since then launching `nixos-rebuild switch`,
while forgetting that you're inside a specialisation, can cause some
parts of your system to get accidentally unloaded.)

I've tried to mitigate that by improving specialisations so that they
create a dedicated file somewhere in `/run/current-system` containing
the specialisation's name (which `nixos-rebuild` could then use as the
default value for `--specialisation`), but I haven't been able to come
up with anything working (plus it would be a breaking change then).

Closes https://github.com/NixOS/nixpkgs/issues/174065
2023-01-15 18:16:49 +01:00
..
administration doc,nixos/doc: unescape apostrophes 2022-12-27 17:13:47 +01:00
configuration services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
development nixos/manual: mention that module chapters should use markdown 2023-01-10 10:31:59 +01:00
from_md nixos: add --specialisation to nixos-rebuild 2023-01-15 18:16:49 +01:00
installation doc/installation: fix incorrect channel link 2023-01-03 15:24:36 -05:00
release-notes nixos: add --specialisation to nixos-rebuild 2023-01-15 18:16:49 +01:00
.gitignore
contributing-to-this-manual.chapter.md nixos/manpages: Explain -I option and how to build manpages 2022-12-11 11:00:06 +01:00
default.nix doc: Remove all section numbers 2022-12-12 13:04:39 +01:00
Makefile
man-configuration.xml
man-nixos-build-vms.xml
man-nixos-enter.xml
man-nixos-generate-config.xml
man-nixos-install.xml nixos-install: support --no-root-password 2021-11-22 22:09:50 +02:00
man-nixos-option.xml
man-nixos-rebuild.xml nixos: add --specialisation to nixos-rebuild 2023-01-15 18:16:49 +01:00
man-nixos-version.xml nixos-version: output configurationRevision 2023-01-03 20:40:35 +01:00
man-pages.xml nixos/manual: Update copyright years, authors, and copyright 2022-03-20 12:27:12 +01:00
manual.xml
md-to-db.sh nixos/manual: move "edit the MD file" comments to generated XML 2023-01-10 12:34:37 +01:00
preface.xml Revert "Update preface.xml (#185868)" 2022-08-10 20:26:01 +10:00
README.md
shell.nix