nixos/fwupd: disable test plugins implicitly
invalid test was introduced in 297d1598ef
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.
This commit is contained in:
parent
c942013dbc
commit
e5f7dacc93
3 changed files with 13 additions and 4 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue