KDE: Difference between revisions

Phobos (talk | contribs)
mNo edit summary
Remove unsupported Plasma 5 examples
 
Line 3: Line 3:
== Installation ==
== Installation ==


=== Plasma 6 ===
To use KDE Plasma, add this to your configuration.nix:


{{file|3=# Enable Plasma  
{{file|3=# Enable Plasma  
Line 18: Line 18:
# Optionally enable xserver
# Optionally enable xserver
services.xserver.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}
services.xserver.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}
=== Plasma 5 ===
{{file|3=# Enable Plasma 5 and xserver
services.xserver = {
  enable = true;
  desktopManager.plasma5.enable = true;
};
# Enable the default display manager
services.displayManager.sddm.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}''<big>'''Note:'''</big> As of 2024, KDE Plasma 5 is end of life will not be available after NixOS 25.05.''


== Configuration ==
== Configuration ==
Line 47: Line 36:


Some optional packages can be excluded if they are not needed at the cost of functionality.
Some optional packages can be excluded if they are not needed at the cost of functionality.
==== Plasma 6 ====


Optional packages: [https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/services/desktop-managers/plasma6.nix#L159-L174 plasma6.nix]
Optional packages: [https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/services/desktop-managers/plasma6.nix#L159-L174 plasma6.nix]
Line 57: Line 44:
   konsole
   konsole
   elisa
   elisa
];
</syntaxHighlight>
==== Plasma 5 ====
Optional packages: [https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/x11/desktop-managers/plasma5.nix#L278-L282 plasma5.nix]
<syntaxHighlight lang=nix>
environment.plasma5.excludePackages = with pkgs.libsForQt5; [
  plasma-browser-integration
  konsole
  oxygen
];
];
</syntaxHighlight>
</syntaxHighlight>


=== Default Wayland/X11 session ===
=== Default Wayland/X11 session ===
==== Plasma 6 ====


Plasma 6 runs on Wayland by default. To launch an X11 session by default:
Plasma 6 runs on Wayland by default. To launch an X11 session by default:
Line 86: Line 59:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
services.displayManager.sddm.wayland.enable = true;
services.displayManager.sddm.wayland.enable = true;
</syntaxhighlight>
==== Plasma 5 ====
Plasma 5 runs on X11 by default and it is recommended to use Wayland with Plasma 6 instead. To launch a Wayland session by default anyway:
<syntaxhighlight lang="nix">
services.displayManager.defaultSession = "plasmawayland";
</syntaxhighlight>
</syntaxhighlight>