anchor.diff:    config = mkIf cfg.enable {
       boot.kernelModules = [ "msr" ];
   
  +    warnings = optional (cfg.extraConfig != "") ''
  +      Using config.services.tlp.extraConfig is deprecated and will become unsupported in a future release. Use config.services.tlp.settings instead.
  +    '';
  +
  +    assertions = [{
  +      assertion = cfg.enable -> config.powerManagement.scsiLinkPolicy == null;
  +      message = ''
  +        `services.tlp.enable` and `config.powerManagement.scsiLinkPolicy` cannot be set both.
  +        Set `services.tlp.settings.SATA_LINKPWR_ON_AC` and `services.tlp.settings.SATA_LINKPWR_ON_BAT` instead.
  +      '';
  +    }];
  +
       environment.etc = {
  -      "tlp.conf".text = cfg.extraConfig;
  +      "tlp.conf".text = (mkTlpConfig cfg.settings) + cfg.extraConfig;
       } // optionalAttrs enableRDW {
         "NetworkManager/dispatcher.d/99tlp-rdw-nm".source =
           "${tlp}/etc/NetworkManager/dispatcher.d/99tlp-rdw-nm";
  
positive.code: 
      environment.systemPackages = [ tlp ];
  
      # FIXME: When the config is parametrized we need to move these into a
      # conditional on the relevant options being enabled.
      powerManagement = {
        scsiLinkPolicy = null;
        cpuFreqGovernor = null;
        cpufreq.max = null;
        cpufreq.min = null;
      };
  
      services.udev.packages = [ tlp ];
  
      systemd = {
        packages = [ tlp ];
        # XXX: These must always be disabled/masked according to [1].
        #
  
negative.code:   mkTlpConfig = tlpConfig: generators.toKeyValue {
      mkKeyValue = generators.mkKeyValueDefault {
        mkValueString = val:
          if isList val then "\"" + (toString val) + "\""
          else toString val;
      } "=";
    } tlpConfig;
  in
  