From e5f7dacc93ef3657baf7ddeccceaa6a8617c8b2a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 6 Feb 2020 19:31:59 +0100 Subject: 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. --- nixos/modules/services/hardware/fwupd.nix | 5 ++++- nixos/tests/installed-tests/fwupd.nix | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix index 51877970a8bc..e586af25c2b1 100644 --- a/nixos/modules/services/hardware/fwupd.nix +++ b/nixos/modules/services/hardware/fwupd.nix @@ -53,7 +53,7 @@ in { blacklistPlugins = mkOption { type = types.listOf types.str; - default = [ "test" ]; + default = []; example = [ "udev" ]; description = '' Allow blacklisting specific plugins @@ -91,6 +91,9 @@ in { ###### implementation config = mkIf cfg.enable { + # Disable test related plug-ins implicitly so that users do not have to care about them. + services.fwupd.blacklistPlugins = cfg.package.defaultBlacklistedPlugins; + environment.systemPackages = [ cfg.package ]; environment.etc = { diff --git a/nixos/tests/installed-tests/fwupd.nix b/nixos/tests/installed-tests/fwupd.nix index b9f761e99582..6a0ceb57dda4 100644 --- a/nixos/tests/installed-tests/fwupd.nix +++ b/nixos/tests/installed-tests/fwupd.nix @@ -1,11 +1,11 @@ -{ pkgs, makeInstalledTest, ... }: +{ pkgs, lib, makeInstalledTest, ... }: makeInstalledTest { tested = pkgs.fwupd; testConfig = { services.fwupd.enable = true; - services.fwupd.blacklistPlugins = []; # don't blacklist test plugin + services.fwupd.blacklistPlugins = lib.mkForce []; # don't blacklist test plugin services.fwupd.enableTestRemote = true; virtualisation.memorySize = 768; }; -- cgit 1.4.1