Is there a NixOS way of setting the following in configuration.nix:
DisableCapsuleUpdateOnDisk=true
in /etc/fwupd/uefi_capsule.conf
Is there a NixOS way of setting the following in configuration.nix:
DisableCapsuleUpdateOnDisk=true
in /etc/fwupd/uefi_capsule.conf
Use environment.etc
, this is what the NixOS modules use under the hood to place configuration files, too.
Use environment.etc, this is what the NixOS modules use under the hood to place configuration files, too.
Unfortunately, itβs not that easy in this specific case.
The fwupd module links the /etc/fwupd/uefi_capsule.conf' into place from
/nix/store/hashashhashhash-fwupd/etc/uefi_capsule.confβ. The module should be fixed to allow overriding all the files in there.
You might be able to do this (untested - Iβm not sure mkForce works in this case):
βββββ
β {
β environment.etc.βfwupd/uefi_capsule.confβ.text = lib.mkForce ββ
β [uefi_capsule]
β whatever settings you need
β ββ;
β }
βββββ
Hmm. Looking more closely at https://github.com/NixOS/nixpkgs/blob/e43cf1748462c81202a32b26294e9f8eefcc3462/nixos/modules/services/hardware/fwupd.nix and https://github.com/NixOS/nixpkgs/blob/e43cf1748462c81202a32b26294e9f8eefcc3462/pkgs/os-specific/linux/firmware/fwupd/default.nix, I think youβd have to edit uefi_capsule.conf
by using overrideAttrs
and adding/editing a step in the build (Iβd probably choose to amend postPatch
), then feeding that overridden fwupd
derivation to services.fwupd.package
.