{
  lib,
  config,
  pkgs,
  ...
}: let
  inherit (lib) mkEnableOption mkIf;
  cfg = config.horseman.wm.plasma;
  homeCfg = config.horseman;
in {
  options = {
    horseman.wm.plasma = {
      enable = mkEnableOption "Plasma 6";
    };
  };

  config = mkIf cfg.enable {
    services = {
      xserver.enable = true;

      desktopManager.plasma6.enable = true;

      power-profiles-daemon.enable = true;
    };

    environment.plasma6.excludePackages = with pkgs.kdePackages; [
      kate
      konsole
    ];

    home-manager.users.${homeCfg.username} = {
      imports = [./config.nix];
    };
  };
}
