{ lib
, config
, system
, windows-theme
, ...
}:
{
  options = {
    nixp = {
      enable = lib.mkEnableOption "enable XP configuration in MATE";

      theme = {
        plymouth.enable = lib.mkEnableOption "enable plymouth Windows XP theme";
        grub.enable = lib.mkEnableOption "enable grub Windows XP theme";
      };
    };
  };

  config = lib.mkMerge [
    (lib.mkIf config.nixp.enable {

      nixp = {
        theme = {
          plymouth.enable = lib.mkDefault true;
          grub.enable = lib.mkDefault true;
        };
      };

      services = {
        xserver.displayManager.lightdm.background = ../assets/wall.png;
      };

      environment.systemPackages = with windows-theme.packages.x86_64-linux; [
        windows-xp-theme
        windows-xp-icons
        windows-xp-cursor
      ];
    })
    (lib.mkIf config.nixp.theme.plymouth.enable {
      boot = {
        plymouth = {
          theme = "xp";
          themePackages = [ windows-theme.packages.${system}.windows-xp-plymouth ];
        };
      };
    })
    (lib.mkIf config.nixp.theme.grub.enable {
      boot.loader.grub.theme = windows-theme.packages.${system}.windows-xp-grub;
    })
  ];
}
