about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authormaxine <35892750+amaxine@users.noreply.github.com>2024-02-10 11:05:51 +0100
committerGitHub <noreply@github.com>2024-02-10 11:05:51 +0100
commit53f6fedd041a8b49d143bfe230fa72db5316ce58 (patch)
treec423ad56f58e5c71918cdcfda0a717e55faf101f /nixos
parent4f66133f9388355a4dda1ff54a053f57dee86bc2 (diff)
parent12de1b3a387b53e577aef885ea766cd9f2d36238 (diff)
downloadnixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.tar
nixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.tar.gz
nixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.tar.bz2
nixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.tar.lz
nixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.tar.xz
nixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.tar.zst
nixlib-53f6fedd041a8b49d143bfe230fa72db5316ce58.zip
Merge pull request #287512 from r-vdp/fwupd_1_9_13
fwupd: 1.9.12 -> 1.9.13
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/hardware/fwupd.nix23
-rw-r--r--nixos/tests/installed-tests/fwupd.nix9
2 files changed, 17 insertions, 15 deletions
diff --git a/nixos/modules/services/hardware/fwupd.nix b/nixos/modules/services/hardware/fwupd.nix
index 6fbcbe676460..ebb6fa09aadb 100644
--- a/nixos/modules/services/hardware/fwupd.nix
+++ b/nixos/modules/services/hardware/fwupd.nix
@@ -51,7 +51,9 @@ let
     # to install it because it would create a cyclic dependency between
     # the outputs. We also need to enable the remote,
     # which should not be done by default.
-    lib.optionalAttrs cfg.enableTestRemote (enableRemote cfg.package.installedTests "fwupd-tests")
+    lib.optionalAttrs
+      (cfg.daemonSettings.TestDevices or false)
+      (enableRemote cfg.package.installedTests "fwupd-tests")
   );
 
 in {
@@ -86,15 +88,6 @@ in {
         '';
       };
 
-      enableTestRemote = mkOption {
-        type = types.bool;
-        default = false;
-        description = lib.mdDoc ''
-          Whether to enable test remote. This is used by
-          [installed tests](https://github.com/fwupd/fwupd/blob/master/data/installed-tests/README.md).
-        '';
-      };
-
       package = mkPackageOption pkgs "fwupd" { };
 
       daemonSettings = mkOption {
@@ -128,6 +121,15 @@ in {
                 or if this partition is not mounted at /boot/efi, /boot, or /efi
               '';
             };
+
+            TestDevices = mkOption {
+              type = types.bool;
+              default = false;
+              description = lib.mdDoc ''
+                Create virtual test devices and remote for validating daemon flows.
+                This is only intended for CI testing and development purposes.
+              '';
+            };
           };
         };
         default = {};
@@ -159,7 +161,6 @@ in {
   config = mkIf cfg.enable {
     # Disable test related plug-ins implicitly so that users do not have to care about them.
     services.fwupd.daemonSettings = {
-      DisabledPlugins = cfg.package.defaultDisabledPlugins;
       EspLocation = config.boot.loader.efi.efiSysMountPoint;
     };
 
diff --git a/nixos/tests/installed-tests/fwupd.nix b/nixos/tests/installed-tests/fwupd.nix
index c095a50dc836..fe4f443d7004 100644
--- a/nixos/tests/installed-tests/fwupd.nix
+++ b/nixos/tests/installed-tests/fwupd.nix
@@ -1,11 +1,12 @@
-{ pkgs, lib, makeInstalledTest, ... }:
+{ pkgs, makeInstalledTest, ... }:
 
 makeInstalledTest {
   tested = pkgs.fwupd;
 
   testConfig = {
-    services.fwupd.enable = true;
-    services.fwupd.daemonSettings.DisabledPlugins = lib.mkForce [ ]; # don't disable test plugin
-    services.fwupd.enableTestRemote = true;
+    services.fwupd = {
+      enable = true;
+      daemonSettings.TestDevices = true;
+    };
   };
 }