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

{
  # Packages
  environment.systemPackages = with pkgs; [
    # Messaging
    thunderbird

    # Video
    vlc

    # Audio
    easyeffects

    # Office
    libreoffice
    onlyoffice-bin
    hunspell
    hunspellDicts.fr-reforme1990
    hunspellDicts.fr-any
    hunspellDicts.fr-moderne
    hunspellDicts.en_US
    hunspellDicts.en_GB-ize

    # Printing
    hplipWithPlugin
  ];

  # Flatpaks
  services.flatpak = lib.mkIf (config?services.flatpak.packages) {
    uninstallUnmanaged = true;
    update.onActivation = true;
    update.auto.enable = true;
  };

  fonts = {
    enableDefaultPackages = true;
    packages = with pkgs; [
      noto-fonts
      noto-fonts-cjk-sans
      noto-fonts-lgc-plus
      noto-fonts-emoji
      cantarell-fonts
      unstable.adwaita-fonts
      twitter-color-emoji
      twemoji-color-font
      # (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
      nerd-fonts.jetbrains-mono
    ];

    fontconfig = {
      useEmbeddedBitmaps = true;

      defaultFonts = {
        sansSerif = [ "Adwaita" "Noto Sans" ];
        monospace = [ "JetBrainsMono Nerd Font" ];
        emoji = [ "Twitter Color Emoji" "Noto Color Emoji" ];
      };
    };
  };
}
