nixos/sddm: a bunch of kwin-related fixes (#337749)

This commit is contained in:
K900 2024-08-27 21:12:11 +03:00 committed by GitHub
commit 93095a052b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -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;
});
@ -43,11 +44,8 @@ let
DefaultSession = optionalString (config.services.displayManager.defaultSession != null) "${config.services.displayManager.defaultSession}.desktop";
DisplayServer = if cfg.wayland.enable then "wayland" else "x11";
} // optionalAttrs (cfg.wayland.compositor == "kwin") {
GreeterEnvironment = concatStringsSep " " [
"LANG=C.UTF-8"
"QT_WAYLAND_SHELL_INTEGRATION=layer-shell"
];
} // optionalAttrs (cfg.wayland.enable && cfg.wayland.compositor == "kwin") {
GreeterEnvironment = "QT_WAYLAND_SHELL_INTEGRATION=layer-shell";
InputMethod = ""; # needed if we are using --inputmethod with kwin
};

View File

@ -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 = {

View File

@ -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 { };