templates/system/modules/ui/desktops/kde.nix
Andre 857679a823 feat(system): add Flatpak support
chore(system): replace test data with abort messages
2024-06-30 13:18:46 -04:00

55 lines
1.3 KiB
Nix

# Enables the KDE desktop environment.
{
pkgs,
config,
lib,
...
}:
let
cfg = config.aux.system.ui.desktops.kde;
in
{
options = {
aux.system.ui.desktops.kde = {
enable = lib.mkEnableOption (lib.mdDoc "Enables the KDE Desktop Environment.");
useX11 = lib.mkEnableOption (lib.mdDoc "Uses X11 instead of Wayland.");
};
};
config = lib.mkIf cfg.enable {
aux.system.ui.desktops.enable = true;
programs.dconf.enable = true;
# Fix blank messages in KMail. See https://nixos.wiki/wiki/KDE#KMail_Renders_Blank_Messages
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";
};
};
}