nixos-configuration/modules/desktop/kde.nix
2023-09-11 19:16:26 +02:00

65 lines
1.2 KiB
Nix

{
config,
pkgs,
lib,
...
}: let
desktopCfg = config.my.desktop;
cfg = desktopCfg.kde;
applyKdeUserSettings = {
home = {
packages = with pkgs; [
];
};
services.kdeconnect = {
enable = true;
indicator = true;
};
};
in {
options.my.desktop.kde = {
enable = lib.mkEnableOption "KDE desktop";
};
config = lib.mkIf cfg.enable {
my.desktop.enable = true;
services = {
# Enable the KDE Plasma Desktop Environment.
xserver = {
desktopManager.plasma5.enable = true;
displayManager = {
sddm.enable = true;
defaultSession = "plasmawayland";
};
};
};
environment = {
systemPackages = with pkgs; [
libsForQt5.kate
libsForQt5.kalk
];
plasma5.excludePackages = with pkgs.libsForQt5; [
elisa
gwenview
okular
khelpcenter
];
};
programs = {
dconf.enable = true;
partition-manager.enable = true;
};
home-manager.users = {
vinzenz = lib.mkIf desktopCfg.vinzenz.enable applyKdeUserSettings;
ronja = lib.mkIf desktopCfg.ronja.enable applyKdeUserSettings;
};
};
}