feat: make boot messages configureable
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 >>>[0mboot.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:
- [ ] NixOS tests in nixos/tests.
- [ ] Package tests at
passthru.tests. - [ ] Tests in lib/tests or pkgs/test for functions and "core" functionality.
- [ ] Ran
nixpkgs-reviewon 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.
Bad photo, but seems it breaks formatting? But only for the Stage 1 message. so that's weird.
Thank you for your feedback! I will try and get to this in the next 2 days.
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 :)
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.
Ok, I removed the lustrate message config and squashed.
Done! Thanks for your feedback and approval!