
{ nixosConfig, lib, ... }:
let
  cfg = nixosConfig.my.desktop.nixcord;
in
{
  config = lib.mkIf cfg.enable {
    programs.nixcord = {
      enable = true;          # Enable Nixcord (It also installs Discord)
      discord = {
        vencord.enable = false;  # Use Vencord (default)
        equicord.enable = true;  # Or use Equicord instead (cannot enable both)
      };
      vesktop.enable = false;  # Vesktop
      equibop = {
        enable = true;
      };  # Equibop
      dorion.enable = false;   # Dorion
      quickCss = "@import url(\"https://catppuccin.github.io/discord/dist/catppuccin-mocha-mauve.theme.css\");";  # quickCSS file
      config = {
        useQuickCss = true;   # use out quickCSS
        frameless = true;                   # Set some Vencord/Equicord options
      };
      equibopConfig = {
        plugins = {
          AlwaysTrust.enabled = true;
          BetterSessions.enabled = true;
          BetterSettings.enabled = true;
          BiggerStreamPreview.enabled = true;
          CallTimer.enabled = true;
          ClearURLs.enabled = true;
          CopyEmojiMarkdown.enabled = true;
          CopyFileContents.enabled = true;
          CopyUserURLs.enabled = true;
          CrashHandler.enabled = true;
          CustomIdle = {
            enabled = true;
            idleTimeout = 0;
            remainInIdle = false;
          };
          Dearrow.enabled = true;
          DisableCallIdle.enabled = true;
          ExpressionCloner.enabled = true;
          FavoriteEmojiFirst.enabled = true;
          FixSpotifyEmbeds.enabled = true;
          FixYoutubeEmbeds.enabled = true;
          FullSearchContext.enabled = true;
          GameActivityToggle.enabled = true;
          GifPaste.enabled = true;
          ImageZoom.enabled = true;
          LoadingQuotes.enabled = true;
          MemberCount.enabled = true;
          MentionAvatars.enabled = true;
          MessageLinkEmbeds.enabled = true;
          MessageLogger = {
            enabled = true;
            inlineEdits = false;
          };
          NewGuildSettings.enabled = true;
          NoF1.enabled = true;
          NoOnboardingDelay.enabled = true;
          NormalizeMessageLinks.enabled = true;
          NoUnblockToJump.enabled = true;
          OnePingPerDm.enabled = true;
          OpenInApp.enabled = true;
          PetPet.enabled = true;
          ReadAllNotificationsButton.enabled = true;
          RelationshipNotifier.enabled = true;
          ReverseImageSearch.enabled = true;
          ServerInfo.enabled = true;
          ServerListIndicators.enabled = false;
          ShowHiddenChannels.enabled = true;
          ShowHiddenThings.enabled = true;
          MusicControls = {
            enabled = true;
            showSpotifyControls = true;
          };
          ThemeAttributes.enabled = true;
          TypingIndicator.enabled = true;
          TypingTweaks.enabled = true;
          UnlockedAvatarZoom.enabled = true;
          UnsuppressEmbeds.enabled = true;
          UserVoiceShow.enabled = true;
          ValidUser.enabled = true;
          ViewIcons.enabled = true;
          ViewRaw.enabled = true;
          VoiceChatDoubleClick.enabled = true;
          VoiceDownload.enabled = true;
          VoiceMessages.enabled = true;
          WebKeybinds.enabled = true;
          WebScreenShareFixes.enabled = true;
          WhoReacted.enabled = true;
          YoutubeAdblock.enabled = true;
          DisableDeepLinks.enabled = true;
          NoTrack.enabled = true;
          Settings.enabled = true;
          SupportHelper.enabled = true;
          WebContextMenus.enabled = true;
          "WebRichPresence (arRPC)".enabled = true;
        };
      };
      extraConfig = {
      };
    };
  };
}