diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-11-27 05:29:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-27 05:29:58 +0000 |
commit | 1b5df99e7aefbeb7e0566bf819f502908399488c (patch) | |
tree | dc0fb5f718afce596722da5d2b6a2dcb5d517349 /nixos/modules/services/x11/display-managers | |
parent | a1f82db35130229f05203623dd6188c0b3ec4a53 (diff) | |
parent | d41a2e33989efbe3843a26b73d3c2d38ca048c1e (diff) |
Merge pull request #70295 from worldofpeace/mutter-eglstreams
Mutter eglstreams
Diffstat (limited to 'nixos/modules/services/x11/display-managers')
-rw-r--r-- | nixos/modules/services/x11/display-managers/gdm.nix | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 0af9ccfcf3e4..912ec5bd38ed 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -126,11 +126,21 @@ in wayland = mkOption { default = true; description = '' - Allow GDM run on Wayland instead of Xserver + Allow GDM to run on Wayland instead of Xserver. + Note to enable Wayland with Nvidia you need to + enable the <option>nvidiaWayland</option>. ''; type = types.bool; }; + nvidiaWayland = mkOption { + default = false; + description = '' + Whether to allow wayland to be used with the proprietary + NVidia graphics driver. + ''; + }; + autoSuspend = mkOption { default = true; description = '' @@ -237,6 +247,19 @@ in services.dbus.packages = [ gdm ]; + # We duplicate upstream's udev rules manually to make wayland with nvidia configurable + services.udev.extraRules = '' + # disable Wayland on Cirrus chipsets + ATTR{vendor}=="0x1013", ATTR{device}=="0x00b8", ATTR{subsystem_vendor}=="0x1af4", ATTR{subsystem_device}=="0x1100", RUN+="${gdm}/libexec/gdm-disable-wayland" + # disable Wayland on Hi1710 chipsets + ATTR{vendor}=="0x19e5", ATTR{device}=="0x1711", RUN+="${gdm}/libexec/gdm-disable-wayland" + ${optionalString (!cfg.gdm.nvidiaWayland) '' + DRIVER=="nvidia", RUN+="${gdm}/libexec/gdm-disable-wayland" + ''} + # disable Wayland when modesetting is disabled + IMPORT{cmdline}="nomodeset", RUN+="${gdm}/libexec/gdm-disable-wayland" + ''; + systemd.user.services.dbus.wantedBy = [ "default.target" ]; programs.dconf.profiles.gdm = |