nixpkgs/nixos/doc/manual
Janne Heß 96d36b0c2e
nixos/switch-to-configuration: Proper unit file parser
This replaces the naive K=V unit parser with a proper INI parser from a
library and adds proper support for override files. Also adds a bunch of
comments about parsing, I hope this makes it easier to understand and
maintain in the future.

There are multiple reasons to do so, the first one is just general
correctness with is nice imo. But to get to more serious reasons (I
didn't put in all that effort for nothing) is that this is the first
step torwards more clever restart/reload handling. By using a library
like Data::Compare a future PR could replace the current way of
fingerprinting units (which is to compare store paths) by comparing the
hashes. This is more precise because units won't get restarted because
the order of the options change, comments are added, some dependency of
writeText changes, .... Also this allows us to add a feature like
`X-Reload-Triggers` so the unit can either be reloaded when these change
or restarted when everything else changes, giving module authors the
ability to have their services reloaded without having to fear that
updates are not applied because the service doesn't get restarted.
Another reason why this feature is nice is that now that the unit files
are parsed correctly (and values are just extracted from one section),
potential future rewrites can just rely on some INI library without
having to implement their own weird parser that is compatible with this
script.

This also comes with a new subroutine to handle systemd booleans because
I thought the current way of handling it was just ugly. This also allows
overriding values this script reads in an override file.

Apart from making this script more compatible with the world around it,
this also fixes two issues I saw bugging exactly 0 (zero) people. First
is that this script now supports multiple override files, also ones that
are not called override.conf and the second one is that `1` and `on` are
treated as bools by systemd but were previously not parsed as such by
switch-to-configuration.
2022-01-20 15:10:23 +01:00
..
administration postgresql_9_6: drop 2021-12-03 01:14:29 +01:00
configuration nixos/doc: improve example of renaming network interfaces 2021-11-21 20:12:31 -08:00
development Merge pull request #146905 from Synthetica9/failure_mode 2022-01-08 18:28:25 +01:00
from_md nixos/switch-to-configuration: Proper unit file parser 2022-01-20 15:10:23 +01:00
installation [21.11] update README.md 2021-11-29 20:15:35 -05:00
release-notes nixos/switch-to-configuration: Proper unit file parser 2022-01-20 15:10:23 +01:00
.gitignore
contributing-to-this-manual.chapter.md nixos/doc: convert "Contributing to this manual" to CommonMark 2021-05-22 18:14:49 -07:00
default.nix nixos/documentation: fix docs cross build 2022-01-08 16:03:23 +01:00
Makefile nixos/doc/manual/Makefile: Do not format 2021-03-22 21:15:11 +01:00
man-configuration.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-build-vms.xml nixos/doc/*: editorconfig fixes 2020-07-31 15:08:54 +10:00
man-nixos-enter.xml nixos/doc: Improve code listings 2020-09-23 01:25:25 +02:00
man-nixos-generate-config.xml nixos/doc: fix manpage format 2019-10-05 15:55:49 +00:00
man-nixos-install.xml nixos-install: support --no-root-password 2021-11-22 22:09:50 +02:00
man-nixos-option.xml Merge pull request #75439 from Ma27/submodule-fixes-for-nixos-option 2020-02-01 10:00:59 +01:00
man-nixos-rebuild.xml Update nixos-rebuild man page to reflect target-host change 2021-12-22 00:56:19 -08:00
man-nixos-version.xml nixos/doc: Improve code listings 2020-09-23 01:25:25 +02:00
man-pages.xml nixos/doc+manual: update copyright year range end 2019->2020 2020-01-14 07:01:39 -06:00
manual.xml nixos/doc: convert "Contributing to this manual" to CommonMark 2021-05-22 18:14:49 -07:00
md-to-db.sh nixos/doc/md-to-db.sh: handle path to nixpkgs with spaces 2021-10-10 11:57:51 +02:00
preface.xml Link to Libera, Matrix instead of Freenode 2021-07-06 16:35:37 +02:00
README.md nixos/manual: Fix link to contributing guide 2021-07-16 22:55:28 -07:00
shell.nix mkShell: introduce packages argument (#122180) 2021-05-13 19:17:29 +02:00