Skip to content

nixos/grub-install: execute prepare commands earlier#99618

Draft
andir wants to merge 1 commit intoNixOS:masterfrom
andir:run-prepare-command-early
Draft

nixos/grub-install: execute prepare commands earlier#99618
andir wants to merge 1 commit intoNixOS:masterfrom
andir:run-prepare-command-early

Conversation

@andir
Copy link
Member

@andir andir commented Oct 5, 2020

Motivation for this change

Previously the extraPrepareConfig commands where exectued after the grub
entries were generated. With this new location we can run commands
before the initrd appender scripts is executed. This is especially
helpful with the recent change to the sshd host keys of openssh in the
initrd. In the old setup you did not have to provision host keys (and
you might not even have cared about them) but with the new setup you
must always provide host keys even if you do not care about them.

In my personal setup I have everything encrypted except that initrd. The
initrd is basically public knowledge as anyone (on the hosting provider)
will be able to read that key from the initrd.

cc @mweinelt #98100

Previously the extraPrepareConfig commands where exectued after the grub
entries were generated. With this new location we can run commands
before the initrd appender scripts is executed. This is especially
helpful with the recent change to the sshd host keys of openssh in the
initrd. In the old setup you did not have to provision host keys (and
you might not even have cared about them) but with the new setup you
must always provide host keys even if you do not care about them.

In my personal setup I have everything encrypted except that initrd. The
initrd is basically public knowledge as anyone (on the hosting provider)
will be able to read that key from the initrd.
@ofborg ofborg 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/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Oct 5, 2020
@andir andir marked this pull request as ready for review October 6, 2020 21:05
@andir andir requested review from mweinelt and roosemberth November 2, 2020 22:19
@andir andir mentioned this pull request Nov 3, 2020
10 tasks
@stale
Copy link

stale bot commented Jun 4, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 4, 2021
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank marked this pull request as draft March 25, 2024 16:14
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 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: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants