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

{
  imports = [ ];

  options.me.graphics_card_type = lib.mkOption {
    type = lib.types.nullOr (
      lib.types.enum [
        "amd"
        "intel"
        "nvidia"
      ]
    );
    default = null;
    example = "amd";
    description = "What graphics card type is in the computer.";
  };

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

  config = (
    lib.mkMerge [
      (lib.mkIf config.me.graphical {
        environment.systemPackages = with pkgs; [
          mesa-demos # for glxgears
          vulkan-tools # for vkcube
          xeyes # to test which windows are using x11
        ];
        hardware.graphics.enable = true;
        # hardware.graphics.enable32Bit = true;

        # Vulkan Support (64-bit is enabled by default, 32-bit is disabled by default)
        # hardware.opengl.driSupport = true; # This is already enabled by default
        # hardware.opengl.driSupport32Bit = true; # For 32 bit applications
      })
      (lib.mkIf (config.me.graphics_card_type == "amd") {
        environment.systemPackages = with pkgs; [
          nvtopPackages.amd
        ];
      })
      (lib.mkIf (config.me.graphics_card_type == "intel") {
        environment.systemPackages = with pkgs; [
          nvtopPackages.intel
        ];
      })
      (lib.mkIf (config.me.graphics_card_type == "nvidia") {
        environment.systemPackages = with pkgs; [
          nvtopPackages.nvidia
        ];
      })
    ]
  );
}
