2024-06-24 15:38:28 +00:00
|
|
|
# Enables the KDE desktop environment.
|
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
2024-12-06 16:46:10 +00:00
|
|
|
namespace,
|
2024-06-24 15:38:28 +00:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2024-12-06 16:46:10 +00:00
|
|
|
cfg = config.${namespace}.ui.desktops.kde;
|
2024-06-24 15:38:28 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2024-12-06 16:46:10 +00:00
|
|
|
${namespace}.ui.desktops.kde = {
|
2024-09-08 15:58:56 +00:00
|
|
|
enable = lib.mkEnableOption "Enables the KDE Desktop Environment.";
|
|
|
|
useX11 = lib.mkEnableOption "Uses X11 instead of Wayland.";
|
2024-06-24 15:38:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
2024-12-06 16:46:10 +00:00
|
|
|
${namespace}.ui.desktops.enable = true;
|
2024-06-24 15:38:28 +00:00
|
|
|
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
2024-07-13 17:34:59 +00:00
|
|
|
# Fix blank messages in KMail. See https://wiki.nixos.org/wiki/KDE#KMail_Renders_Blank_Messages
|
2024-06-24 15:38:28 +00:00
|
|
|
environment.sessionVariables = {
|
|
|
|
NIX_PROFILES = "${pkgs.lib.concatStringsSep " " (
|
|
|
|
pkgs.lib.reverseList config.environment.profiles
|
|
|
|
)}";
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
displayManager.sddm.enable = true;
|
|
|
|
desktopManager.plasma6.enable = true;
|
|
|
|
|
|
|
|
xserver.displayManager = lib.mkIf cfg.useX11 {
|
|
|
|
defaultSession = "plasmaX11";
|
|
|
|
sddm.wayland.enable = lib.mkIf (
|
|
|
|
!(
|
|
|
|
config.services.xserver.displayManager.gdm.enable
|
|
|
|
|| config.services.xserver.displayManager.lightdm.enable
|
|
|
|
)
|
|
|
|
) true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable Gnome integration
|
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
platformTheme = "gnome";
|
|
|
|
style = "adwaita-dark";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|