{ pkgs, ... }:
{
  home.packages = with pkgs; [

    # essentials
    htop-vim
    lsof
    postgresql

    zip
    unzip
    pcmanfm
    xdg-utils # used for xdg-open
    appimage-run
    glab
    tio
    tcpdump

    # graphics
    (zathura.override { plugins = [ zathuraPkgs.zathura_pdf_mupdf ]; })
    gimp
    ffmpeg
    jellyfin-media-player
    imv

    # bluetooth
    blueman

    # internet
    google-chrome
    liferea
    openvpn
    thunderbird

    # messaging
    tdesktop
    profanity
    gomuks

    # games
    prismlauncher
    superTuxKart
    # space-cadet-pinball

    # cryptography
    yubikey-manager
    # bitwarden-cli

    # misc
    xournalpp
    libreoffice
    mosh
    typst
    hut
    wine
    # ansible
    ansible-lint
    (python3.withPackages (ps: [
      # ps.ansible
      ps.ansible-core
      ps.pip
      ps.requests

      ps.pyls-isort
      ps.pylsp-mypy
      # python-lsp-black
      ps.python-lsp-server

      # pylsp optional dependencies
      ps.types-requests
      ps.flake8
      ps.mccabe
      ps.pycodestyle
      ps.pydocstyle
      ps.pyflakes
      ps.pylint
    ]))


    # programming languages
    cargo
    rustc
    rustfmt
    clippy
    gcc
    nodejs_20
    gnumake
    go
    pre-commit

    # fancy tools
    just
    himalaya
    # strace but with colors
    # (strace.overrideAttrs (_: {
    #   patches = [
    #     (fetchpatch {
    #       url = "https://raw.githubusercontent.com/xfgusta/strace-with-colors/main/strace-with-colors.patch";
    #       hash = "sha256-gcQldGsRgvGnrDX0zqcLTpEpchNEbCUFdKyii0wetEI=";
    #     })
    #   ];
    # }))

  ];

  programs.firefox.enable = true;
  # ugly and Broken
  # programs = {
  #   thunderbird = {
  #     enable = true;
  #     profiles = {
  #       default = {
  #         withExternalGnupg = true;
  #         isDefault = true;
  #         settings = {
  #           "intl.date_time.pattern_override.connector_short" = "{1} {0}";
  #           "intl.date_time.pattern_override.date_short" = "yyyy-MM-dd";
  #           "intl.date_time.pattern_override.time_short" = "HH:mm";
  #         };
  #       };
  #     };
  #   };
  # };
  services.gnome-keyring.enable = true;

  xdg.mimeApps = {
    enable = true;
    defaultApplications =
      let
        image-viewers = [ "imv.desktop" "google-chrome.desktop" "gimp.desktop" "swappy.desktop" "org.qutebrowser.qutebrowser.desktop" ];
        browsers = [ "google-chrome.desktop" "firefox.desktop" "org.qutebrowser.qutebrowser.desktop" ];
      in
      {
        "application/pdf" = [ "org.pwmt.zathura.desktop" ];
        "image/png" = image-viewers;
        "image/jpg" = image-viewers;
        "image/jpeg" = image-viewers;
        "image/tiff" = image-viewers;
        "image/gif" = image-viewers;
        "image/webp" = image-viewers;
        "image/ico" = image-viewers;
        "image/svg" = browsers;
        "x-scheme-handler/http" = browsers;
        "x-scheme-handler/https" = browsers;
        "x-scheme-handler/tg" = [ "org.telegram.desktop.desktop" ];
        "x-scheme-handler/tonsite" = [ "org.telegram.desktop.desktop" ];
      };
  };
}
