Skip to content

Inject the repository commit id in boot menu entries - #228

Open
nlewo wants to merge 1 commit into
cloud-gouv:mainfrom
nlewo:boot-entry-commit-id
Open

Inject the repository commit id in boot menu entries#228
nlewo wants to merge 1 commit into
cloud-gouv:mainfrom
nlewo:boot-entry-commit-id

Conversation

@nlewo

@nlewo nlewo commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

For convenience, it allows to get the commit id from the boot menu, but this modifies the derivation produced by nixos-rebuild since the commit id is injected via the builtins.getEnv.

For convenience, it allows to get the commit id from the boot menu,
but this modifies the derivation produced by nixos-rebuild since the
commit id is injected via the builtins.getEnv.
@nlewo
nlewo force-pushed the boot-entry-commit-id branch from 039ccd4 to 62c6b8d Compare July 29, 2026 14:28
;
# nixos-rebuild is wrapped to add the repository HEAD commit id to the added boot menu entry.
# Note the derivation produced by this nixos-rebuild wrapper then differs from the one produced from the repository itself since it injects the commit id via builtins.getEnv.
nixos-rebuild-wrapped = pkgs.writeShellApplication {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it should be moved into a proper overlay directory and overlaid in the ambient pkgs so that every other module can refer to it, including the upgrade manual command

i also think it should shadow nixos-rebuild directly and re-expose nixos-rebuild unwrapped as an attribute on it as it's usual etiquette in nixpkgs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants