Skip to content

Commit

Permalink
nixos/gdm,nvidia: new options to enable GDM on Wayland and disabling …
Browse files Browse the repository at this point in the history
…it for nvidia drivers.
  • Loading branch information
roastiek authored and fpletz committed Sep 27, 2017
1 parent 4f91397 commit 4ef8233
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nixos/modules/hardware/video/nvidia.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ in
{

config = mkIf enabled {
assertions = [
{
assertion = services.xserver.displayManager.gdm.wayland;
message = "NVidia drivers don't support wayland";
}
];

services.xserver.drivers = singleton
{ name = "nvidia"; modules = [ nvidia_x11.bin ]; libPath = [ nvidia_x11 ]; };
Expand Down
9 changes: 9 additions & 0 deletions nixos/modules/services/x11/display-managers/gdm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ in
};
};

wayland = mkOption {
default = true;
description = ''
Allow GDM run on Wayland instead of Xserver
'';
type = types.bool;
};

};

};
Expand Down Expand Up @@ -139,6 +147,7 @@ in
# presented and there's a little delay.
environment.etc."gdm/custom.conf".text = ''
[daemon]
WaylandEnable=${if cfg.gdm.wayland then "true" else "false"}
${optionalString cfg.gdm.autoLogin.enable (
if cfg.gdm.autoLogin.delay > 0 then ''
TimedLoginEnable=true
Expand Down

1 comment on commit 4ef8233

@vcunat
Copy link
Member

@vcunat vcunat commented on 4ef8233 Dec 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-ref: #51836

Please sign in to comment.