nixos/gdm,nvidia: new options to enable GDM on Wayland and disabling it for nvidia drivers.
This commit is contained in:
parent
4f91397c98
commit
4ef82339c9
|
@ -40,6 +40,12 @@ in
|
||||||
{
|
{
|
||||||
|
|
||||||
config = mkIf enabled {
|
config = mkIf enabled {
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = services.xserver.displayManager.gdm.wayland;
|
||||||
|
message = "NVidia drivers don't support wayland";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
services.xserver.drivers = singleton
|
services.xserver.drivers = singleton
|
||||||
{ name = "nvidia"; modules = [ nvidia_x11.bin ]; libPath = [ nvidia_x11 ]; };
|
{ name = "nvidia"; modules = [ nvidia_x11.bin ]; libPath = [ nvidia_x11 ]; };
|
||||||
|
|
|
@ -64,6 +64,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wayland = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Allow GDM run on Wayland instead of Xserver
|
||||||
|
'';
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -139,6 +147,7 @@ in
|
||||||
# presented and there's a little delay.
|
# presented and there's a little delay.
|
||||||
environment.etc."gdm/custom.conf".text = ''
|
environment.etc."gdm/custom.conf".text = ''
|
||||||
[daemon]
|
[daemon]
|
||||||
|
WaylandEnable=${if cfg.gdm.wayland then "true" else "false"}
|
||||||
${optionalString cfg.gdm.autoLogin.enable (
|
${optionalString cfg.gdm.autoLogin.enable (
|
||||||
if cfg.gdm.autoLogin.delay > 0 then ''
|
if cfg.gdm.autoLogin.delay > 0 then ''
|
||||||
TimedLoginEnable=true
|
TimedLoginEnable=true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user