diff options
-rw-r--r-- | nixos/modules/services/hardware/fwupd.nix | 5 | ||||
-rw-r--r-- | nixos/tests/installed-tests/fwupd.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/firmware/fwupd/default.nix | 8 |
3 files changed, 13 insertions, 4 deletions
diff --git a/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix index 51877970a8b..e586af25c2b 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 b9f761e9958..6a0ceb57dda 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; }; diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index ee5e9fe5a64..eac2ed4acd0 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -1,4 +1,4 @@ -# Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc +# Updating? Keep $out/etc synchronized with passthru keys { stdenv , fetchurl @@ -274,6 +274,12 @@ stdenv.mkDerivation rec { "pki/fwupd-metadata/LVFS-CA.pem" ]; + # BlacklistPlugins key in fwupd/daemon.conf + defaultBlacklistedPlugins = [ + "test" + "invalid" + ]; + tests = { installedTests = nixosTests.installed-tests.fwupd; }; |