Nixos/documentation: nixos-help: use w3m(1) by default

It is referenced in various places, but does not work out of the box:

$ nixos-help
        /run/current-system/sw/bin/nixos-help: unable to start a web browser; please set $BROWSER

In the user-hidden fallbacks to xdg-open(1) and w3m(1), nixos-help
expects tools to be deliberately installed by users.

For default installations and new users in general, this is unlikely to
be the case. Conversely, chances to use nixos-help are even higher
in such cases.

Use w3m-nographics by default to ensure documentation is always
available. The documentation browser on ttyS8 already does so, but is
not accessible in every installation, e.g. VMs with only ttyS0 and SSH
available.

This obsoletes including it in the base profile’s systemPackages,
so remove the @TODO as done.

Link to plaintext patch against latest HEAD 635e3b1e6fd as produced with git-format-patch(1): https://termbin.com/w81c

3 Likes

Any specific reason not to open a PR? :slight_smile:

That would require me to sign up at GitHub, which is a Microsoft owned service that uses an EULA I do not agree with.

Furthermore, I do not want to support efforts where projects move their infrastructure to such a centralized monopoly. “GitHub” is becoming more and more of a synonym for “Git” due to the self-evident usage in the FOSS community.

Also, it is 2019 and yet GitHub does not support IPv6.

1 Like

See also About the Patches category

1 Like

Thanks, being new to Discourse I did not find all relevant information at first.

Should I resend the patch via mail and thereby open a new topic or does this one using a paste service still suffice?

Sending via Mail is listed since it is what most people avoiding Git will want to use.

I opened a PR: https://github.com/NixOS/nixpkgs/pull/62891

Some review arrived: https://github.com/NixOS/nixpkgs/pull/62891#discussion_r291836206

I can’t see any motivation to remove w3m from $PATH.

It was removed because nixos-help no longer searches for it but rather calls it by an absoloute path now.

If w3m is still to be installed by default so users do have it in $PATH, then this hunk should of course be omitted.

Yeah, that is how I would understand it from the comment.

Edit: dropped

1 Like