# Shared HM defaults for desktop hosts (git identity, wisdom catalog toggles).
{ ... }: {
  flake.homeManagerModules.desktopHomeDefaults =
    { lib, pkgs, ... }:
    let
      aarch64 = pkgs.stdenv.hostPlatform.isAarch64;
    in
    {
      programs.git = {
        enable = lib.mkDefault true;
        settings.user = {
          name = "OlivierChiasson";
          email = "olivierchiasson@hotmail.fr";
        };
      };

      #TODO[epic=Moderate] Check if git-crypt should belong in desktop-home-base.
      home.packages = [ pkgs.git-crypt ];

      chiasson.home = {
        shell = {
          fish.enable = lib.mkDefault true;
          ohMyPosh.enable = lib.mkDefault true;
          yazi.enable = lib.mkDefault true;
        };

        terminals.kitty.enable = lib.mkDefault true;

        filebrowsers.nemo.enable = lib.mkDefault true;

        browsers = {
          chrome.enable = lib.mkDefault false;
          chromiumHevc = {
            enable = lib.mkDefault true;
            packages = lib.mkDefault (
              if aarch64 then
                [ "chromium" ]
              else
                [ "google-chrome" ]
            );
          } // lib.optionalAttrs (!aarch64) {
            vaapi.gpu = lib.mkDefault "intel";
          };
          edge.enable = lib.mkDefault false;
          flow.enable = lib.mkDefault false;
          orion.enable = lib.mkDefault false;
          zen.enable = lib.mkDefault false;
        };

        editors = {
          cursor.enable = lib.mkDefault true;
          kate.enable = lib.mkDefault false;
          obsidian.enable = lib.mkDefault true;
        };

        apps = {
          discord.enable = lib.mkDefault false;
          localsend.enable = lib.mkDefault true;
          pokeclicker.enable = lib.mkDefault false;
          spotify = {
            enable = lib.mkDefault false;
            openDiscoveryFirewall = lib.mkDefault false;
          };
        };

        desktop = {
          screenshot = {
            enable = lib.mkDefault true;
            swiftshareApiKeyFile = "/run/secrets/swiftshare/API_KEY"; #TODO[epic=sops] redo this by passing sops file output directly
          };
          theming.enable = lib.mkDefault true;
        };

        hardware.uconsoleGamepad.enable = lib.mkDefault false;
      };
    };
}
