-
-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/doc: set groff mdoc os registers properly #214307
Conversation
the nixpkgs site-tmac sets doc-default-operating-system and doc-volume-operating-system to Nixpkgs, which is mostly correct but somewhat confusing for Nix*OS* manpages. luckily the previous dance was overly complicated and we can instead just change the registers differently if we detect a nixpkgs groff. this also means we can use plain `.Os` without hard-coding the os as detected by mandoc.
we thought that mandoc inspects not sure what to do with that knowledge to be honest. groff was explicitly set to |
@sternenseemann can we make mandoc say "Nixpkgs" too? (In the general case — these pages should still say "NixOS" ideally since they're for the NixOS tools.) (The person who originally set that doesn't seem to be active any more.) |
I'd be fine with that, sure. |
if mdoc is changed to use OS=NixOS, how much of this PR would remain? sounds like we could (should?) drop it entirely. |
You mean Nixpkgs? |
eh, yes. 🤦 |
I'd say so! I'd also drop all the shenanigans from the mdoc files and just use the default OS. If we are too bothered by it I'd make "nixos-versions" of mandoc and groff that are injected into the man viewers via the man-db/mandoc nixos modules (since we can't change it globally via a config file?). |
superseded by #217705 |
Description of changes
the nixpkgs site-tmac sets doc-default-operating-system and doc-volume-operating-system to Nixpkgs, which is mostly correct but somewhat confusing for NixOS manpages. luckily the previous dance was overly complicated and we can instead just change the registers differently if we detect a nixpkgs groff. this also means we can use plain
.Os
without hard-coding the os as detected by mandoc.followup from #213256 (comment)
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes