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

nixos/fwupd: allow customization of uefi_capsule.conf. #208326

Closed
wants to merge 1 commit into from

Conversation

danderson
Copy link
Contributor

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
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Signed-off-by: David Anderson <dave@natulte.net>
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/how-to-disablecapsuleupdateondisk-in-etc-fwupd-uefi-capsule-conf/23751/6

@jtojnar
Copy link
Contributor

jtojnar commented Jan 26, 2023

Turns out this option has been moved away and having it in this file will make fwupd fail. Will be fixed in #212860

@jtojnar jtojnar closed this Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants