Skip to content

nixos/version: allow overriding, use 24-bit colour code#351736

Merged
jopejoe1 merged 2 commits intoNixOS:masterfrom
SigmaSquadron:version
Nov 29, 2024
Merged

nixos/version: allow overriding, use 24-bit colour code#351736
jopejoe1 merged 2 commits intoNixOS:masterfrom
SigmaSquadron:version

Conversation

@SigmaSquadron
Copy link
Contributor

@SigmaSquadron SigmaSquadron commented Oct 27, 2024

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:

  1. Fedora Linux (2020)
  2. Arch Linux (2020) + some Arch forks
  3. Chimera Linux (2022)
2. add extraOSReleaseArgs and extraLSBReleaseArgs

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.

This also removes the SUPPORT_END tag that was added erroneously to unstable.

Things done


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 27, 2024
@SigmaSquadron SigmaSquadron added the 2.status: wait for branch‐off Waiting for the next Nixpkgs branch‐off label Oct 27, 2024
@emilazy
Copy link
Member

emilazy commented Oct 29, 2024

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.

@SigmaSquadron
Copy link
Contributor Author

SigmaSquadron commented Oct 29, 2024 via email

@emilazy
Copy link
Member

emilazy commented Oct 29, 2024

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.

@SigmaSquadron
Copy link
Contributor Author

SigmaSquadron commented Oct 29, 2024

Terminal.app

I... wasn't considering Darwin. Is this used by nix-darwin or standalone Nix on macOS somehow?

@emilazy
Copy link
Member

emilazy commented Oct 29, 2024

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.

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Oct 30, 2024
@SigmaSquadron SigmaSquadron changed the title nixos/version: add more options, use 24-bit colour code nixos/version: allow overriding, use 24-bit colour code Oct 31, 2024
@SigmaSquadron
Copy link
Contributor Author

SigmaSquadron commented Oct 31, 2024

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.

@SigmaSquadron SigmaSquadron force-pushed the version branch 2 times, most recently from 2d189d7 to 4d08201 Compare October 31, 2024 22:36
@SigmaSquadron SigmaSquadron added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: wait for branch‐off Waiting for the next Nixpkgs branch‐off labels Nov 17, 2024
@SigmaSquadron SigmaSquadron removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 23, 2024
@SigmaSquadron SigmaSquadron added 8.has: clean-up This PR removes packages or removes other cruft 12.approvals: 1 This PR was reviewed and approved by one person. labels Nov 23, 2024
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]>
@jopejoe1 jopejoe1 merged commit e16d20f into NixOS:master Nov 29, 2024
@SigmaSquadron SigmaSquadron deleted the version branch November 29, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: clean-up This PR removes packages or removes other cruft 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants