{
  pkgs,
  config,
  ...
}
: {
  programs.kodi = {
    enable = true;
    package =
      pkgs.kodi-wayland.withPackages
      (exts:
        with exts; [
          jellyfin
          steam-launcher
          joystick
          youtube
        ]);
    datadir = "${config.xdg.dataHome}/kodi";
    addonSettings = {
      "plugin.video.jellyfin" = {
        "username" = "tristan"; # type="text" default="" visible="true" enable="false" />
        "serverName" = "movies.tristans.cloud"; # type="text" default="" enable="false" />
        "server" = "https://movies.tristans.cloud/"; # type="text" default="" visible="true" enable="false" />
        # "sslverify" = false; # type="bool" default="true" visible="true" />
        "kodiCompanion" = "true"; # sync queue
      };
      "plugin.script.steam.launcher" = {
        "KodiLinux" = "${pkgs.steam}/bin/steam"; # type="executable" label="Your Steam executable file (Steam.exe)"
      };
    };
  };
}
