#
# GUI packages we want in our environment.
# For machines that have GUI support.
#
# vim: et:ts=2:sw=2:
#
{
  pkgs,
  deprekages,
  niri,
  ...
}:
with pkgs;
[
  wezterm
  _1password-gui

  # Comms.
  dino
  gajim
  vesktop
  nheko

  (pkgs.weechat.override {
    configure =
      { availablePlugins, ... }:
      {

        # Load our plugins on startup, and set up our color theme.
        init = ''
          /set weechat.bar.status.color_bg 0
          /set weechat.bar.title.color_bg 0
          /set weechat.color.chat_nick_colors 1,2,3,4,5,6
          /set buffers.color.hotlist_message_fg 7
          /set weechat.bar.buffers.position top
          /set buflist.format.buffer "\''${format_number}\''${indent}\''${cut:20,...,\''${format_nick_prefix}\''${format_name}}"
          /set buflist.look.sort active
          /remote add deprekages https://irc.ktemk.in:8001
          /set relay.remote.deprekages.password "\''${sec.data.remote}"
          /remote connect deprekages
        '';

      };
  })

  # Office.
  thunderbird
  libreoffice
  drawio
  krita
  xournalpp
  kdePackages.itinerary
  deprekages.notion-app

  # PDFs.
  (zathuraPkgs.override { useMupdf = false; }).zathuraWrapper

  # Dev
  bytecode-viewer
  # Poking our phone.

  # Backup
  kitty

  # Media
  pavucontrol
  deprekages.argos
  tidal-hifi
  vlc
]

# Linux-only packages.
++ (
  if pkgs.stdenv.isLinux then
    [
      appimage-run
      arduino
      ghidra
      #kicad-small
      obsidian
      onboard

      # Xwayland support.
      xwayland
      cage
      gamescope
      openbox

      # Utilities.
      libinput-gestures
      wl-clipboard
      xclip

      # Extra icon themes that often seem needed despite lack of dependencies.
      adwaita-icon-theme
      gnome-icon-theme
      hicolor-icon-theme

      # Comms.
      #mattermost-desktop
      #nheko
      signal-desktop
      signal-export
      obs-studio

      # Browsers.
      firefox
      chromium # (for webusb)
      falkon

      # Tools.
      inkscape
      p3x-onenote
      virt-manager
      imhex
      gimp
      deluge

      # System utilities.
      nemo-with-extensions
      gvfs

      # Music stuffs.
      ardour
      linvstmanager

      # 3D stuffs.
      freecad
      #sweethome3d.application # currently makes flatpak segfault; what
    ]
  else
    [ ]
)

# Mac-only packages.
++ (
  if pkgs.stdenv.isDarwin then
    [

    ]
  else
    [ ]
)

# x86_64 only packages
++ (
  if pkgs.stdenv.isx86_64 then
    [
      jupyter # For now.
      (wineWowPackages.unstableFull.override { waylandSupport = true; })
      winetricks
      zoom-us
      masterpdfeditor
      android-studio
      slack
      zulip
      obs-studio-plugins.wlrobs
      deprekages.home-assistant-desktop
      bitwig-studio
      calibre
      steam
    ]
  else
    [ ]
)
