nixos/desktop/plasma.nix
Julian Sutter f93fe7e308 Fix Plasma config generation to properly add applications: prefix
- Remove applications: prefix from all desktop modules (plasma.nix, gaming.nix, office.nix, dev.nix, media.nix, dnm.nix)
- Update Plasma config generation to add applications: prefix during merge using map function
- This ensures clean desktop file names in modules while generating correct Plasma format
- All 14 applications from all desktop modules now properly pinned to taskbar
- Modular Plasma pinning system is now fully functional and robust
2025-07-31 01:49:38 -07:00

76 lines
2.4 KiB
Nix

{ 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)}
'';
}];
};
}