{ config, pkgs, lib, home-manager, ... }: { # Define the module option for pinned applications options.desktop.plasma.pinnedApps = lib.mkOption { type = lib.types.listOf lib.types.str; default = []; description = "List of applications to pin to the Plasma taskbar"; }; config = { # Add this module's pinned applications desktop.plasma.pinnedApps = [ "org.kde.konsole.desktop" # Terminal "org.kde.dolphin.desktop" # Folder explorer "firefox.desktop" # Firefox browser "tigervnc.desktop" # TigerVNC ]; services.xserver.enable = true; services.displayManager.sddm.enable = true; services.xserver.displayManager.lightdm.enable = false; services.desktopManager.plasma6.enable = true; environment.plasma6.excludePackages = with pkgs.kdePackages; [ khelpcenter ]; programs.dconf.enable = true; programs.kdeconnect.enable = true; hardware.bluetooth.enable = true; environment.systemPackages = with pkgs; [ kdePackages.spectacle arc-theme # Desktop theme pinentry # GUI pinentry for GPG tigervnc # VNC client/server firefox # Web browser ]; # GNUPG Stuff services.pcscd.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; # RDP services.xrdp.enable = true; services.xrdp.defaultWindowManager = "startplasma-x11"; networking.firewall.allowedTCPPorts = [ 3389 ]; services.xrdp.openFirewall = true; # Custom Keyboard Shortcuts for Plasma 6 environment.etc."kglobalshortcutsrc".text = '' [khotkeys] Ctrl+Alt+Delete=Lock Session,none,Lock the session ''; # stop PackageKit polling services.packagekit.enable = false; # remove the Discover GUI + tray notifier environment.plasma5.excludePackages = with pkgs.libsForQt5; [ discover ]; # Plasma taskbar pinning configuration for all users # Pinned applications are defined in each desktop module and merged here home-manager.sharedModules = [{ xdg.configFile."plasma-org.kde.plasma.desktop-appletsrc".text = '' [Containments][1][Applets][2][Configuration][General] launchers=${lib.concatStringsSep "," (map (app: "applications:${app}") config.desktop.plasma.pinnedApps)} ''; }]; }; }