{ config, pkgs, lib, ... }:
with lib.hm.gvariant;
{
  imports = [
    ../modules/home-manager/browser.nix
    ../modules/home-manager/code.nix
    ../modules/home-manager/dev.nix
    ../modules/home-manager/documents.nix
    ../modules/home-manager/fish.nix
    ../modules/home-manager/flatpaks.nix
    ../modules/home-manager/hypr
    ../modules/home-manager/keepassxc.nix
    ../modules/home-manager/kitty.nix
    ../modules/home-manager/kubectl.nix
    ../modules/home-manager/obsidian.nix
    ../modules/home-manager/owncloud-client.nix
    ../modules/home-manager/stylix.nix
    ../modules/home-manager/thunderbird.nix
    ../modules/home-manager/wofi.nix
    ../modules/home-manager/xdg-portals.nix
  ];

  ## Home Manager configuration
  home.stateVersion = "24.05";
  # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;

  ## Basic configuration
  home.username = "remy";
  home.homeDirectory = "/home/remy";

  ## Utils relevant to this user only
  programs.git = {
    enable = true;
    userName = "Remy Moll";
    userEmail = "me@moll.re";
  };

  ## XDG configuration
  xdg = {
    userDirs = {
      enable = true;
      desktop = "Desktop";
      pictures = "Pictures";
      documents = "Documents";
      publicShare = null;
      music = null;
      templates = null;
    };

    mimeApps = {
      enable = true;
      defaultApplications = {
        "inode/directory" = "org.gnome.Nautilus.desktop";
        "application/zip" = "org.gnome.FileRoller.desktop";
        "application/octet-stream" = "org.gnome.GHex.desktop";
        # pdfs
        "application/pdf" = "org.gnome.Evince.desktop";
        # images
        # "image/png" = "org.gnome.Evince.desktop";
        # "image/jpeg" = "org.gnome.Evince.desktop";
        # "image/gif" = "org.gnome.Evince.desktop";
        # "image/svg+xml" = "org.gnome.Evince.desktop";
        # "image/tiff" = "org.gnome.Evince.desktop";
        # text-based
        "text/*" = "vscode.desktop";
      };
    };
  };
}
