{
  config,
  inputs,
  lib,
  pkgs,
  ...
}:
let
  cfg = config.programs.star-citizen;
  system = pkgs.stdenv.hostPlatform.system;
in {
  options.programs.star-citizen = {
    enable = lib.mkEnableOption "Star Citizen via nix-citizen";

    package = lib.mkOption {
      type = lib.types.enum [
        "rsi-launcher"
        "rsi-launcher-git"
        "rsi-launcher-umu"
        "star-citizen"
        "star-citizen-git"
        "star-citizen-umu"
        "lug-helper"
      ];
      default = "rsi-launcher";
      description = "Package from nix-citizen to install when Star Citizen is enabled.";
    };
  };

  config = lib.mkIf cfg.enable {
    home.packages = [
      inputs.nix-citizen.packages.${system}.${cfg.package}
    ];
  };
}
