nixos/fwupd: allow customization of uefi_capsule.conf. #208326
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: David Anderson dave@natulte.net
Description of changes
The Framework laptop ships firmware through LVFS, but because of some weirdness of their bios images, you have to set
DisableCapsuleUpdateOnDisk=true
in /etc/fwupd/uefi_capsule.conf for the updates to work.From https://discourse.nixos.org/t/how-to-disablecapsuleupdateondisk-in-etc-fwupd-uefi-capsule-conf/23751/4 , currently the only way to do that is to mkForce the entire config file with a replacement.
There's already structured config support in place for daemon.conf, this PR extends it to support uefi_capsule.conf as well. No specific options are defined, because really nobody but nixos-hardware should be grubbing around this low-level, and if you are you already know what setting you want.
This PR doesn't extend this to support structured config for all of fwupd's other files, because that requires building an ini file reader to pull the upstream files out of the package and into structured form, so that we can apply user overrides and re-serialize out to disk. I haven't figured out a clean way to do that yet. However, the upstream uefi_capsule.conf is already being completely overridden by the module's config, so similar to daemon.conf that one file is trivial to translate into structured config.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes