KDE: Difference between revisions
imported>Abowen m KDE 6 |
imported>Matthias Thym Added information for using KDE Plasma 6 |
||
Line 9: | Line 9: | ||
services.xserver.displayManager.sddm.enable = true; | services.xserver.displayManager.sddm.enable = true; | ||
services.xserver.desktopManager.plasma5.enable = true; | services.xserver.desktopManager.plasma5.enable = true; | ||
# services.xserver.desktopManager.plasma6.enable = true; | # KDE Plasma 6 is now available on unstable | ||
# services.xserver.desktopManager.plasma6.enable = true; | |||
</syntaxHighlight> | </syntaxHighlight> | ||
=== Excluding some KDE Plasma applications from the default install === | === Excluding some KDE Plasma applications from the default install === | ||
==== Plasma 5 ==== | |||
Not all applications that come pre-installed with the KDE Plasma desktop environment are desirable for everyone to have on their machines. There's a way to edit configuration.nix to exclude some [https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/x11/desktop-managers/plasma5.nix#L275-L284 optional packages], for example as follows: | Not all applications that come pre-installed with the KDE Plasma desktop environment are desirable for everyone to have on their machines. There's a way to edit configuration.nix to exclude some [https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/x11/desktop-managers/plasma5.nix#L275-L284 optional packages], for example as follows: | ||
Line 18: | Line 21: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
environment.plasma5.excludePackages = with pkgs.libsForQt5; [ | environment.plasma5.excludePackages = with pkgs.libsForQt5; [ | ||
plasma-browser-integration | |||
konsole | |||
oxygen | |||
]; | |||
</syntaxHighlight> | |||
==== Plasma 6 ==== | |||
<syntaxHighlight lang=nix> | |||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ | |||
plasma-browser-integration | plasma-browser-integration | ||
konsole | konsole | ||
Line 74: | Line 87: | ||
=== Launch KDE in Wayland session === | === Launch KDE in Wayland session === | ||
==== Plasma 5 ==== | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
Line 79: | Line 94: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
==== | ==== Plasma 6 ==== | ||
It's possible to launch sddm in | For KDE Plasma 6, the defaults have changed. KDE Plasma 6 runs on Wayland with the default session set to <code>plasma</code>. | ||
If you want to use the X11 session as your default session, change it to <code>plasmax11</code>. | |||
<syntaxHighlight lang=nix> | |||
services.xserver.displayManager.defaultSession = "plasma"; | |||
</syntaxHighlight> | |||
==== Launch SDDM in Wayland too ==== | |||
It's possible to launch sddm in Wayland too to try to avoid running an X server. | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
Line 88: | Line 111: | ||
=== Plasma-Manager === | === Plasma-Manager === | ||
{{note| [https://github.com/pjones/plasma-manager Plasma-Manager] is not matured yet and currently unofficial }} | {{note| [https://github.com/pjones/plasma-manager Plasma-Manager] is not matured yet and currently unofficial }} | ||
On default the plasma configuration can be handeld like on [https://wiki.archlinux.org/title/KDE traditional systems]. | On default the plasma configuration can be handeld like on [https://wiki.archlinux.org/title/KDE traditional systems]. |
Revision as of 08:36, 1 March 2024
KDE Plasma is a desktop environment that aims to be simple by default, powerful when needed.
Installation
To use KDE Plasma, add this to your configuration.nix:
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# KDE Plasma 6 is now available on unstable
# services.xserver.desktopManager.plasma6.enable = true;
Excluding some KDE Plasma applications from the default install
Plasma 5
Not all applications that come pre-installed with the KDE Plasma desktop environment are desirable for everyone to have on their machines. There's a way to edit configuration.nix to exclude some optional packages, for example as follows:
environment.plasma5.excludePackages = with pkgs.libsForQt5; [
plasma-browser-integration
konsole
oxygen
];
Plasma 6
environment.plasma6.excludePackages = with pkgs.kdePackages; [
plasma-browser-integration
konsole
oxygen
];
Configuration
GNOME desktop integration
Using the following example configuration, QT applications will have a look similar to the GNOME desktop, using a dark theme
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
Troubleshoots
Qt/KDE applications segfault on start
This is caused by a stale QML cache (see this issue). A dirty way to fix this is by running on a terminal the following command:
find ${XDG_CACHE_HOME:-$HOME/.cache}/**/qmlcache -type f -delete
GTK themes are not applied in Wayland applications / Window Decorations missing / Cursor looks different
This affects GTK applications including Firefox and Thunderbird.
Add to your configuration.nix the following line:
programs.dconf.enable = true;
You might also need to set a GTK theme Breeze imitating the KDE theme with the same name in System Settings -> Application Style -->Configure GNOME/GTK Application Style.
KMail Renders Blank Messages
When you see the message grantlee.template: "Plugin library 'kde_grantlee_plugin' not found."
and/or kmail does shows only empty message then add to your configuration.nix the following line:
environment.sessionVariables = {
NIX_PROFILES = "${pkgs.lib.concatStringsSep " " (pkgs.lib.reverseList config.environment.profiles)}";
};
Launch KDE in Wayland session
Plasma 5
services.xserver.displayManager.defaultSession = "plasmawayland";
Plasma 6
For KDE Plasma 6, the defaults have changed. KDE Plasma 6 runs on Wayland with the default session set to plasma
.
If you want to use the X11 session as your default session, change it to plasmax11
.
services.xserver.displayManager.defaultSession = "plasma";
Launch SDDM in Wayland too
It's possible to launch sddm in Wayland too to try to avoid running an X server.
services.xserver.displayManager.sddm.wayland.enable = true;
Plasma-Manager
On default the plasma configuration can be handeld like on traditional systems. With plasma-manager it is possible to make plasma configurations via nix by providing home-manager modules.