nixpkgs/nixos/doc/manual/from_md
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 nixos/doc: bump Pandoc 2022-12-27 17:23:25 +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
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
contributing-to-this-manual.chapter.xml nixos/manpages: Explain -I option and how to build manpages 2022-12-11 11:00:06 +01:00
README.md

This directory is temporarily needed while we transition the manual to CommonMark. It stores the output of the ../md-to-db.sh script that converts CommonMark files back to DocBook.

We are choosing to convert the Markdown to DocBook at authoring time instead of manual building time, because we do not want the pandoc toolchain to become part of the NixOS closure.

Do not edit the DocBook files inside this directory or its subdirectories. Instead, edit the corresponding .md file in the normal manual directories, and run ../md-to-db.sh to update the file here.