{
  config,
  lib,
  pkgs,
  ...
}:

{
  imports = [ ];

  options.me = {
    lvfs.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      example = true;
      description = "Whether we want to install lvfs.";
    };
  };

  config = lib.mkIf config.me.lvfs.enable (
    lib.mkMerge [
      {
        # TODO: Is this installing firmware or just downloading it?
        services.fwupd.enable = true;
        services.fwupd.daemonSettings.EspLocation = lib.mkForce "/efi";
        environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
          hideMounts = true;
          directories = [
            {
              directory = "/var/lib/fwupd";
              user = "root";
              group = "root";
              mode = "0755";
            }
          ];
        };
      }
      (lib.mkIf config.me.graphical {
        environment.systemPackages = with pkgs; [
          gnome-firmware
        ];
      })
    ]
  );
}
