Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.boot.loader: Add timestampFormat #366958

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

non-bin
Copy link

@non-bin non-bin commented Dec 20, 2024

Adds the option config.boot.loadertimestampFormat to change how the build timestamp is displayed in bootloaders, as discussed here https://www.reddit.com/r/NixOS/comments/17ilg97/anyone_know_how_to_show_the_time_of_configuration/

This is my first pull request so I'm not sure if it's alright that I skipped some things, like I don't think it needs test (I can't find any existing tests for the modules anyway), and so I need to update the changelog?
Thanks :)

Things done

  • Add option to loader
  • Inherit option into params of substituteAll in .nix files
  • Add template strings to build scripts
  • Build settings tested

    • All on UEFI x86_64-linux VM
    • Grub
      • timestampFormat = "%F %H:%M";
      • timestampFormat unset;
    • systemd-boot
      • timestampFormat = "%F %H:%M";
      • timestampFormat unset;
  • Built on platform(s)

    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:

  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage

  • Tested basic functionality of all binary files (usually in ./result/bin/)

  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.


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 Dec 20, 2024
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Dec 20, 2024
@non-bin non-bin marked this pull request as ready for review December 21, 2024 01:26
@nix-owners nix-owners bot requested a review from JulienMalka December 21, 2024 01:28
Copy link
Contributor

@Flameopathic Flameopathic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure about commit conventions here, given that changes are being made in three modules, but my best guess is that your commit would best be titled nixos/loader: Add timestampFormat option

@non-bin non-bin force-pushed the bootLoaderGenerationFormat branch from da00c34 to c593536 Compare December 21, 2024 21:53
@non-bin
Copy link
Author

non-bin commented Dec 21, 2024

Thanks for the tip, I didn't really understand what it meant but I think I do now, thanks

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: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants