Skip to content

nixos/boot.uki: allow partial overrides of default UKI settings#285114

Merged
nikstur merged 1 commit intoNixOS:masterfrom
WilliButz:improve-uki-settings-merging
Feb 8, 2024
Merged

nixos/boot.uki: allow partial overrides of default UKI settings#285114
nikstur merged 1 commit intoNixOS:masterfrom
WilliButz:improve-uki-settings-merging

Conversation

@WilliButz
Copy link
Member

Description of changes

Previously any user-provided config for boot.uki.settings would need to either specify a full set of config for ukify or a combination of mkOptionDefault to merge the "settings" attribute set with the module's defaults and then mkOverride or mkForce to override a contained attribute.

Now it is possible to trivially override parts of the module's default config, such as the initrd or kernel command line, but overriding the full set of settings now requires mkOverride / mkForce.

Things done

  • 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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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.

Previously any user-provided config for boot.uki.settings would need to
either specify a full set of config for ukify or a combination of
mkOptionDefault to merge the "settings" attribute set with the module's
defaults and then mkOverride or mkForce to override a contained
attribute.

Now it is possible to trivially override parts of the module's default
config, such as the initrd or kernel command line, but overriding the
full set of settings now requires mkOverride / mkForce.
@WilliButz WilliButz requested a review from nikstur January 30, 2024 23:03
@WilliButz WilliButz requested a review from dasJ as a code owner January 30, 2024 23:03
@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 Jan 30, 2024
@ofborg ofborg bot added 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. labels Jan 30, 2024
@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 31, 2024
@nikstur nikstur requested a review from arianvp February 2, 2024 15:36
@nikstur
Copy link
Contributor

nikstur commented Feb 8, 2024

@ofborg test appliance-repart-image

@nikstur nikstur merged commit 4d2c5b7 into NixOS:master Feb 8, 2024
@WilliButz WilliButz deleted the improve-uki-settings-merging branch February 9, 2024 10:53
@nikstur nikstur mentioned this pull request Aug 3, 2025
13 tasks
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: 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. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants