nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

feat: make boot messages configureable

Open Titaniumtown opened this issue 4 weeks ago • 5 comments

I thought it would be a nice feature to have. Making some of the messages shown on boot actual nixos config options.

I made these 3 options:

  • boot.initrd.stage1Greeting: normally [1;32m<<< @distroName@ Stage 1 >>>[0m
  • boot.stage2Greeting: normally \e[1;32m<<< NixOS Stage 2 >>>\\e[0m

I tested this functionality on my machine and it worked!

Things done

  • Built on platform:
    • [X] x86_64-linux
    • [ ] aarch64-linux
    • [ ] x86_64-darwin
    • [ ] aarch64-darwin
  • Tested, as applicable:
  • [ ] Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • [ ] Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • [ ] Package update: when the change is major or breaking.
  • NixOS Release Notes
    • [ ] Module addition: when adding a new NixOS module.
    • [ ] Module update: when the change is significant.
  • [X] Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a :+1: reaction to pull requests you find important.

Titaniumtown avatar Nov 24 '25 20:11 Titaniumtown

Bad photo, but seems it breaks formatting? But only for the Stage 1 message. so that's weird. image

Titaniumtown avatar Nov 24 '25 20:11 Titaniumtown

Thank you for your feedback! I will try and get to this in the next 2 days.

Titaniumtown avatar Nov 30 '25 05:11 Titaniumtown

I think I addressed everything now. I made the colors non-configurable, so only the text is configurable. I will change the commit message once I've received more feedback :)

Titaniumtown avatar Dec 05 '25 15:12 Titaniumtown

I'm pretty sure that message occurs only when "lustrating" is specifically requested by the user, so I feel like making it configurable would only be clutter. Feel free to disagree and I'll give this an approval anyways, but I don't think it's worth including.

I think there's no harm in adding it. It would be strange to only have some messages in the scripts configurable.

Titaniumtown avatar Dec 13 '25 06:12 Titaniumtown

Ok, I removed the lustrate message config and squashed.

Titaniumtown avatar Dec 13 '25 19:12 Titaniumtown

Done! Thanks for your feedback and approval!

Titaniumtown avatar Dec 13 '25 23:12 Titaniumtown