diff options
author | pennae <github@quasiparticle.net> | 2023-01-15 14:56:46 +0100 |
---|---|---|
committer | pennae <82953136+pennae@users.noreply.github.com> | 2023-01-22 17:08:40 +0100 |
commit | df09c21fb262ed07f01099625ef9310a8a8392ae (patch) | |
tree | e2ae96e7be4140d239ca410d1cc39efcb4b0f095 /nixos/modules/misc | |
parent | 45a5c01a26e8fc5752a2bc969977ffc5e9cadac6 (diff) | |
download | nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.tar nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.tar.gz nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.tar.bz2 nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.tar.lz nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.tar.xz nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.tar.zst nixlib-df09c21fb262ed07f01099625ef9310a8a8392ae.zip |
nixos/documentation: deprecate docbook option docs
following the plan in https://github.com/NixOS/nixpkgs/pull/189318#discussion_r961764451 also adds an activation script to print the warning during activation instead of during build, otherwise folks using the new CLI that hides build logs by default might never see the warning.
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r-- | nixos/modules/misc/documentation.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index e44a9899772f..ecc40ad6adef 100644 --- a/nixos/modules/misc/documentation.nix +++ b/nixos/modules/misc/documentation.nix @@ -357,6 +357,14 @@ in (mkIf cfg.nixos.enable { system.build.manual = manual; + system.activationScripts.check-manual-docbook = '' + if [[ $(cat ${manual.optionsUsedDocbook}) = 1 ]]; then + echo -e "\e[31;1mwarning\e[0m: This configuration contains option documentation in docbook." \ + "Support for docbook is deprecated and will be removed after NixOS 23.05." \ + "See nix-store --read-log ${builtins.unsafeDiscardStringContext manual.optionsJSON.drvPath}" + fi + ''; + environment.systemPackages = [] ++ optional cfg.man.enable manual.manpages ++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ]; |