{ pkgs, lib, config, flakeDir, True, ... }: with lib; let hmdir = config.home.homeDirectory; in { options = { module.misc.xdg = { mime.enable = mkEnableOption ""; }; }; imports = [ ./mimeApps.nix ]; config = { xdg = { mime = True; portal = True // { config.common.default = "gtk"; extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-hyprland ]; }; userDirs = True // { createDirectories = true; desktop = "${hmdir}/Desktop"; documents = "${hmdir}/Documents"; download = "${hmdir}/Downloads"; music = "${hmdir}/Music"; pictures = "${hmdir}/Pictures"; publicShare = "${hmdir}/"; templates = "${hmdir}/"; videos = "${hmdir}/Videos"; extraConfig = { XDG_FLAKE_DIR = flakeDir; }; }; }; }; }