{ pkgs, config, lib, osConfig, ... }: let cfg = config.my.graphical; in { imports = [ ./wayland ./dunst.nix ./emacs.nix ./firefox.nix ./keepassxc.nix ./kitty.nix ./mangohud.nix ./mpv.nix ./obs.nix ./qtk.nix ./qutebrowser.nix ./zathura.nix ]; options.my.graphical = { enable = lib.mkEnableOption null; }; config = lib.mkIf cfg.enable { fonts.fontconfig.enable = true; xdg = { userDirs = { enable = true; createDirectories = true; }; mimeApps = { enable = true; defaultApplications = let editor = "emacsclient.desktop"; email = "emacsclient-mail.desktop"; pdf = "org.pwmt.zathura.desktop"; browser = "firefox.desktop"; image = "swayimg.desktop"; video = "mpv.desktop"; explorer = "org.gnome.Nautilus.desktop"; in { "application/octet-stream" = editor; "text/plain" = editor; "x-scheme-handler/http" = browser; "x-scheme-handler/https" = browser; "x-scheme-handler/mailto" = email; "application/pdf" = pdf; "image/bmp" = image; "image/jpeg" = image; "image/gif" = image; "image/png" = image; "image/svg+xml" = image; "image/webp" = image; "inode/directory" = explorer; "video/mp4" = video; "video/mpeg" = video; }; }; }; services = let bluetooth = osConfig.my.desktop.bluetooth.enable; networkManager = osConfig.my.networking.networkManager.enable; in { mpris-proxy.enable = bluetooth; blueman-applet.enable = bluetooth; network-manager-applet.enable = networkManager; }; home = let cursorSize = 32; in { pointerCursor = { package = pkgs.catppuccin-cursors.mochaDark; name = "catppuccin-mocha-dark-cursors"; size = cursorSize; gtk.enable = true; }; sessionVariables = lib.mkIf config.my.graphical.wayland.hyprland.hyprcursor { HYPRCURSOR_THEME = "catppuccin-mocha-dark"; HYPRCURSOR_SIZE = cursorSize; }; }; }; }