Skip to content

Plasma Wayland#44139

Merged
ttuegel merged 2 commits intoNixOS:masterfrom
bkchr:plasma_wayland
Jul 28, 2018
Merged

Plasma Wayland#44139
ttuegel merged 2 commits intoNixOS:masterfrom
bkchr:plasma_wayland

Conversation

@bkchr
Copy link
Contributor

@bkchr bkchr commented Jul 26, 2018

Motivation for this change

Adds support for starting Plasma under Wayland. However, it still requires the following patch to get it shown in SDDM:

diff --git a/nixos/modules/services/x11/display-managers/sddm.nix b/nixos/modules/services/x11/display-managers/sddm.nix
index 426b899586f..66e481bc6f5 100644
--- a/nixos/modules/services/x11/display-managers/sddm.nix
+++ b/nixos/modules/services/x11/display-managers/sddm.nix
@@ -58,6 +58,8 @@ let
 
     [Wayland]
     EnableHidpi=${if cfg.enableHidpi then "true" else "false"}
+    SessionCommand=${lib.getBin pkgs.sddm}/share/sddm/scripts/wayland-session
+    SessionDir=/etc/wayland
 
     ${optionalString cfg.autoLogin.enable ''
     [Autologin]
@@ -262,10 +264,21 @@ in
       home = "/var/lib/sddm";
       group = "sddm";
       uid = config.ids.uids.sddm;
+      extraGroups = [ "video" ];
     };
 
     environment.etc."sddm.conf".source = cfgFile;
 
+    environment.etc."wayland/plasma-wayland.desktop".text = ''
+      [Desktop Entry]
+      Encoding=UTF-8
+      Type=Application
+      Exec=/run/current-system/sw/bin/dbus-run-session ${lib.getBin pkgs.plasma-workspace}/bin/startplasmacompositor
+      TryExec=${lib.getBin pkgs.plasma-workspace}/bin/startplasmacompositor
+      DesktopNames=KDE
+      Name=Plasma-wayland
+    '';
+
     users.groups.sddm.gid = config.ids.gids.sddm;
 
     environment.systemPackages = [ sddm ];

CC @worldofpeace @adisbladis @peterhoeg

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

bkchr added 2 commits July 26, 2018 23:28
Libdrm is required to enable the DRM backend that is used by Wayland.
We changed some if condition that is not required to be changed.
@bkchr bkchr requested a review from ttuegel as a code owner July 26, 2018 21:30
@bkchr bkchr mentioned this pull request Jul 26, 2018
@GrahamcOfBorg GrahamcOfBorg added 6.topic: qt/kde Object-oriented framework for GUI creation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jul 26, 2018
@ttuegel ttuegel merged commit 4ac6a8b into NixOS:master Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: qt/kde Object-oriented framework for GUI creation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants