nixos/fwupd: disable test plugins implicitly
invalid test was introduced in https://github.com/fwupd/fwupd/commit/297d1598ef0739dc27c6cc884697bfd2ca03f2f5
and it is disabled in the shipped daemon.conf.
I forgot to reflect that in the module, which caused the daemon to print the following on start-up:
FuEngine invalid has incorrect built version invalid
and the command to warn:
WARNING: The daemon has loaded 3rd party code and is no longer supported by the upstream developers!
To reduce the change of this happening in the future, I moved the list of default disabled plug-ins to the package expression.
I also set the value of the NixOS module option in the config section of the module instead of the default value used previously,
which will allow users to not care about these plug-ins.
commite5f7dacc93ef3657baf7ddeccceaa6a8617c8b2a
authorJan Tojnar <jtojnar@gmail.com>
dateThu 6 Feb 2020, 19:31 (7 years ago)
parentc942013
nixos/modules/services/hardware/fwupd.nix+4−1
@@ -53,7 +53,7 @@ in {
5353
5454 blacklistPlugins = mkOption {
5555 type = types.listOf types.str;
56− default = [ "test" ];
56+ default = [];
5757 example = [ "udev" ];
5858 description = ''
5959 Allow blacklisting specific plugins
@@ -91,6 +91,9 @@ in {
9191
9292 ###### implementation
9393 config = mkIf cfg.enable {
94+ # Disable test related plug-ins implicitly so that users do not have to care about them.
95+ services.fwupd.blacklistPlugins = cfg.package.defaultBlacklistedPlugins;
96+
9497 environment.systemPackages = [ cfg.package ];
9598
9699 environment.etc = {
nixos/tests/installed-tests/fwupd.nix+2−2
@@ -1,11 +1,11 @@
1−{ pkgs, makeInstalledTest, ... }:
1+{ pkgs, lib, makeInstalledTest, ... }:
22
33makeInstalledTest {
44 tested = pkgs.fwupd;
55
66 testConfig = {
77 services.fwupd.enable = true;
8− services.fwupd.blacklistPlugins = []; # don't blacklist test plugin
8+ services.fwupd.blacklistPlugins = lib.mkForce []; # don't blacklist test plugin
99 services.fwupd.enableTestRemote = true;
1010 virtualisation.memorySize = 768;
1111 };
pkgs/os-specific/linux/firmware/fwupd/default.nix+7−1
@@ -1,4 +1,4 @@
1−# Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc
1+# Updating? Keep $out/etc synchronized with passthru keys
22
33{ stdenv
44, fetchurl
@@ -274,6 +274,12 @@ stdenv.mkDerivation rec {
274274 "pki/fwupd-metadata/LVFS-CA.pem"
275275 ];
276276
277+ # BlacklistPlugins key in fwupd/daemon.conf
278+ defaultBlacklistedPlugins = [
279+ "test"
280+ "invalid"
281+ ];
282+
277283 tests = {
278284 installedTests = nixosTests.installed-tests.fwupd;
279285 };