Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions nixos/modules/services/display-managers/sddm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});

Expand Down Expand Up @@ -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
};

Expand Down
6 changes: 5 additions & 1 deletion pkgs/applications/display-managers/sddm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/qt6-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };

Expand Down