From 363df5ad86ddad600a69694d472b1328c53ac9ab Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 27 Aug 2024 20:15:00 +0300 Subject: [PATCH] nixos/sddm: add layer-shell-qt to the wrapper when kwin is used Otherwise the greeter just dies immediately. --- nixos/modules/services/display-managers/sddm.nix | 1 + pkgs/applications/display-managers/sddm/default.nix | 6 +++++- pkgs/top-level/qt6-packages.nix | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/display-managers/sddm.nix b/nixos/modules/services/display-managers/sddm.nix index 711d5c439fc6..ca46d627101a 100644 --- a/nixos/modules/services/display-managers/sddm.nix +++ b/nixos/modules/services/display-managers/sddm.nix @@ -8,6 +8,7 @@ let sddm = cfg.package.override (old: { withWayland = cfg.wayland.enable; + withLayerShellQt = cfg.wayland.compositor == "kwin"; extraPackages = old.extraPackages or [ ] ++ cfg.extraPackages; }); diff --git a/pkgs/applications/display-managers/sddm/default.nix b/pkgs/applications/display-managers/sddm/default.nix index 45268ae44bdf..451317fae268 100644 --- a/pkgs/applications/display-managers/sddm/default.nix +++ b/pkgs/applications/display-managers/sddm/default.nix @@ -2,16 +2,20 @@ lib, callPackage, runCommand, + layer-shell-qt, qtwayland, wrapQtAppsHook, unwrapped ? callPackage ./unwrapped.nix {}, withWayland ? false, + withLayerShellQt ? false, extraPackages ? [], }: runCommand "sddm-wrapped" { inherit (unwrapped) version; - buildInputs = unwrapped.buildInputs ++ extraPackages ++ lib.optional withWayland qtwayland; + buildInputs = unwrapped.buildInputs ++ extraPackages + ++ lib.optional withWayland qtwayland + ++ lib.optional (withWayland && withLayerShellQt) layer-shell-qt; nativeBuildInputs = [ wrapQtAppsHook ]; passthru = { diff --git a/pkgs/top-level/qt6-packages.nix b/pkgs/top-level/qt6-packages.nix index aab679783224..f63e2245b59b 100644 --- a/pkgs/top-level/qt6-packages.nix +++ b/pkgs/top-level/qt6-packages.nix @@ -104,7 +104,7 @@ makeScopeWithSplicing' { # Not a library, but we do want it to be built for every qt version there # is, to allow users to choose the right build if needed. - sddm = callPackage ../applications/display-managers/sddm {}; + sddm = kdePackages.callPackage ../applications/display-managers/sddm {}; sierra-breeze-enhanced = kdePackages.callPackage ../data/themes/kwin-decorations/sierra-breeze-enhanced { };