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

{
  environment.systemPackages = with pkgs; [
    # Web
    fragments
    varia
    whatip
    epiphany

    # Image
    drawing
    loupe
    snapshot

    # Video
    kooha
    video-trimmer

    # Audio
    shortwave
    gnome-podcasts
    gnome-sound-recorder

    # Reading
    papers

    # Note taking
    apostrophe
    setzer

    # Programming
    # devtoolbox

    # Containers & VMs
    gnome-boxes

    # System
    gnome-firmware

    # Utilities
    impression
    resources
    file-roller
    baobab

    # Customization
    gnome-tweaks
    gnome-extension-manager
    adw-gtk3
    paper-icon-theme
  ];

  services.flatpak = lib.mkIf (config?services.flatpak.packages) {
    remotes = lib.mkOptionDefault [{
      name = "gnome-nightly";
      location = "https://nightly.gnome.org/gnome-nightly.flatpakrepo";
    }];

    packages = [
      # Image
      "page.kramo.Sly"

      # Video
      "org.nickvision.tubeconverter"

      # Audio
      "io.github.revisto.drum-machine"

      # Reading
      "com.github.johnfactotum.Foliate"

      # Science
      "com.github.alexhuntley.Plots"

      # Office
      "com.belmoussaoui.Obfuscate"
      "com.github.muriloventuroso.pdftricks"
      "com.github.flxzt.rnote"
      "com.github.jeromerobert.pdfarranger"
      "garden.jamie.Morphosis"

      # Utilities
      "com.belmoussaoui.Decoder"
      "io.github.nokse22.minitext"
      "io.github.fabrialberio.pinapp"
      "re.sonny.Eloquent"

      # Customization
      "ca.desrt.dconf-editor"
      "app.drey.Damask"
      "com.github.GradienceTeam.Gradience"

      # Games
      "dev.tchx84.Gameeky"
      "dev.tchx84.Gameeky.ThematicPack.FreedomValley"
      "dev.tchx84.Gameeky.ThematicPack.Blasterman"
      "dev.tchx84.Gameeky.ThematicPack.Wackman"

      # Programming
      { appId = "org.gnome.Builder.Devel"; origin = "gnome-nightly"; }
      "app.drey.Biblioteca"
    ];
  };
}
