anchor.diff:            <link xlink:href="https://github.com/hughsie/fwupd/blob/master/data/installed-tests/README.md">installed tests</link>.
           '';
         };
  +
  +      package = mkOption {
  +        type = types.package;
  +        default = pkgs.fwupd;
  +        description = ''
  +          Which fwupd package to use.
  +        '';
  +      };
       };
     };
   
   
     ###### implementation
     config = mkIf cfg.enable {
  -    environment.systemPackages = [ pkgs.fwupd ];
  +    environment.systemPackages = [ cfg.package ];
   
       environment.etc = {
         "fwupd/daemon.conf" = {
  
positive.code:   cfg = config.services.fwupd;
    originalEtc =
      let
        mkEtcFile = n: nameValuePair n { source = "${pkgs.fwupd}/etc/${n}"; };
      in listToAttrs (map mkEtcFile pkgs.fwupd.filesInstalledToEtc);
    extraTrustedKeys =
      let
        mkName = p: "pki/fwupd/${baseNameOf (toString p)}";
  
negative.code:     "fwupd/remotes.d/fwupd-tests.conf" = {
        source = pkgs.runCommand "fwupd-tests-enabled.conf" {} ''
          sed "s,^Enabled=false,Enabled=true," \
          "${cfg.package.installedTests}/etc/fwupd/remotes.d/fwupd-tests.conf" > "$out"
        '';
      };
    } else {};
  