nixos/version: allow overriding, use 24-bit colour code#351736
nixos/version: allow overriding, use 24-bit colour code#351736jopejoe1 merged 2 commits intoNixOS:masterfrom
Conversation
84efc13 to
4c09c57
Compare
|
Would it be possible to include the old colour as well for backwards compatibility with terminal emulators that don’t support 24‐bit colour? There are still some in wide use. |
|
I don't believe we can. That said, backwards compatibility probably doesn't matter much here, as other equally up-to-date distros, like Fedora or Arch, have used a 24-bit ANSI_COLOR for years with no reported issues, and they're probably running on a lot more non-sRGB screens than NixOS is.
|
|
Fair enough. It’s not about the screens so much as the terminal emulators, but admittedly I suspect a strong majority of non‐Terminal.app terminals have caught up by now. |
I... wasn't considering Darwin. Is this used by nix-darwin or standalone Nix on macOS somehow? |
4c09c57 to
22e3994
Compare
|
No, but terminal output isn’t only viewed on the platform that generated it, since it’s very common to SSH into servers and the like. Anyway, I think it’s fine, since it’s purely cosmetic and most terminals are probably less behind the times than Apple’s. |
22e3994 to
bbae42d
Compare
|
Looks like a lot of the changes from this PR were implemented elsewhere recently. There's only the ANSI_COLOR change and the override left. |
2d189d7 to
4d08201
Compare
4d08201 to
41617ab
Compare
It's almost 2025; we don't need to use 3-bit colour anymore. Let's use the proper colour code for NixOS' light blue: https://github.com/NixOS/nixos-artwork/blob/ea1384e183f556a94df85c7aa1dcd411f5a69646/logo/README.md#colours Signed-off-by: Fernando Rodrigues <[email protected]>
A free-form `attrsOf str` option that is merged with the /etc/os-release builder, allowing downstreams to customise arbitrary os-release fields. This is separate from the variant option, as using an attribute set merge means one gets an infinte recursion when making extraOSReleaseArgs a recursive set, and the variant attribute is useful to define elsewhere or multiple times. Ditto for /etc/lsb-release. Signed-off-by: Fernando Rodrigues <[email protected]>
41617ab to
02e1f93
Compare
1. use 24-bit ANSI colour code
It's almost 2025; we don't need to use 3-bit colour anymore. Let's use the proper colour code for NixOS' light blue.
Other distributions have already done this:
2. add
extraOSReleaseArgsandextraLSBReleaseArgsA free-form
attrsOf stroption that is merged with the /etc/os-releasebuilder, allowing downstreams to customise arbitrary os-release fields.
This is separate from the variant option, as using an attribute set
merge means one gets an infinte recursion when making extraOSReleaseArgs
a recursive set, and the variant attribute is useful to define elsewhere
or multiple times.
This also removes the SUPPORT_END tag that was added erroneously to
unstable.Things done
Add a 👍 reaction to pull requests you find important.