templates/system/modules/ui/desktops/kde.nix
Andre 3b0a0ef579
Some checks failed
Code Check / Run nixfmt and statix (push) Has been cancelled
Code Check / Run nixfmt and statix (pull_request) Has been cancelled
refactor(system): fix conflicts between desktop environment login managers
2024-07-11 18:13:05 -04:00

49 lines
1.1 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;
displayManager = if cfg.useX11 then lib.mkDefault "sddm" else lib.mkDefault "sddm_wayland";
};
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 = {
desktopManager.plasma6.enable = true;
xserver.displayManager = lib.mkIf cfg.useX11 { defaultSession = "plasmaX11"; };
};
# Enable Gnome integration
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
};
}