{ config, inputs, lib, pkgs, ... }: let cfg = config.nixfiles.modules.kde; in { options.nixfiles.modules.kde.enable = lib.mkEnableOption "KDE Plasma"; config = lib.mkIf cfg.enable { nixfiles.modules = { common.xdg.defaultApplications."org.kde.dolphin" = [ "inode/directory" ]; gnupg.pinentry = pkgs.pinentry-qt; sound.enable = true; }; # stylix.targets.qt.platform = "kde"; hm = { imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; home.sessionVariables.GTK_THEME = config.hm.gtk.theme.name; gtk.theme = lib.mkForce { package = pkgs.kdePackages.breeze-gtk; name = "Breeze"; }; # programs = { # plasma = { # enable = true; # fonts = { # windowTitle = with config.stylix.fonts; { # family = sansSerif.name; # pointSize = sizes.desktop; # }; # }; # desktop = { # icons = { # alignment = "left"; # arrangement = "topToBottom"; # sorting = { # mode = "name"; # descending = true; # foldersFirst = true; # }; # }; # }; # session = { # general.askForConfirmationOnLogout = true; # sessionRestore = { # excludeApplications = [ ]; # restoreOpenApplicationsOnLogin = "whenSessionWasManuallySaved"; # }; # }; # spectacle = { # shortcuts = { # launch = "Meta+S"; # launchWithoutCapturing = "Meta+Alt+S"; # captureActiveWindow = "Meta+Print"; # captureCurrentMonitor = "Print"; # captureEntireDesktop = "Shift+Print"; # captureRectangularRegion = "Meta+Shift+S"; # captureWindowUnderCursor = "Meta+Ctrl+Print"; # recordRegion = "Meta+Shift+R"; # recordScreen = "Meta+Alt+R"; # recordWindow = "Meta+Ctrl+R"; # }; # }; # configFile = { # kcminputrc.Keyboard = with config.services.xserver; { # RepeatDelay = autoRepeatDelay; # RepeatRate = autoRepeatInterval; # }; # }; # }; # }; xdg.configFile = { "fontconfig/conf.d/10-hm-fonts.conf".force = lib.mkForce true; "mimeapps.list".force = lib.mkForce true; }; programs.firefox.profiles.default.settings = { "widget.use-xdg-desktop-portal.file-picker" = 1; "widget.use-xdg-desktop-portal.mime-handler" = 1; }; }; services = { desktopManager.plasma6.enable = true; displayManager.sddm = { enable = true; wayland = { enable = true; compositor = "kwin"; }; }; }; environment = { plasma6.excludePackages = with pkgs.kdePackages; [ elisa gwenview kate khelpcenter print-manager ]; systemPackages = with pkgs.kdePackages; [ plasma-disks ]; }; }; }