xserver.displayManager: change default

Switch from slim to lightdm as the display-manager.
    If plasma5 is used as desktop-manager use sdddm.
    If gnome3 is used as desktop-manager use gdm.

    Based on #12516
This commit is contained in:
lassulus 2018-08-20 14:25:25 +02:00
parent 678695fde5
commit fc035da4a4
10 changed files with 27 additions and 10 deletions

View File

@ -521,6 +521,13 @@ inherit (pkgs.nixos {
all user units for each authenticated user.
</para>
</listitem>
<listitem>
<para>
The default display manager is now LightDM.
To use SLiM set <literal>services.xserver.displayManager.slim.enable</literal>
to <literal>true</literal>.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View File

@ -132,6 +132,7 @@ in {
fonts.fonts = [ pkgs.dejavu_fonts pkgs.cantarell-fonts ];
services.xserver.displayManager.gdm.enable = mkDefault true;
services.xserver.displayManager.extraSessionFilePackages = [ pkgs.gnome3.gnome-session ];
services.xserver.displayManager.sessionCommands = ''
@ -161,6 +162,8 @@ in {
# TODO: Create nautilus-with-extensions package
environment.variables.NAUTILUS_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-3.0";
services.xserver.updateDbusEnvironment = true;
environment.variables.GIO_EXTRA_MODULES = [ "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
"${pkgs.gnome3.glib-networking.out}/lib/gio/modules"
"${pkgs.gnome3.gvfs}/lib/gio/modules" ];

View File

@ -41,10 +41,12 @@ in
config = mkIf cfg.enable {
services.xserver.displayManager.slim = {
services.xserver.displayManager.lightdm = {
enable = true;
autoLogin = true;
defaultUser = cfg.user;
autoLogin = {
enable = true;
user = cfg.user;
};
};
};

View File

@ -87,7 +87,7 @@ in
}
];
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.lightdm.enable = false;
users.users.gdm =
{ name = "gdm";

View File

@ -191,8 +191,6 @@ in
}
];
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.job = {
logToFile = true;

View File

@ -206,8 +206,6 @@ in
}
];
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.job = {
logToFile = true;

View File

@ -49,7 +49,7 @@ in
enable = mkOption {
type = types.bool;
default = config.services.xserver.enable;
default = false;
description = ''
Whether to enable SLiM as the display manager.
'';

View File

@ -535,6 +535,15 @@ in
config = mkIf cfg.enable {
services.xserver.displayManager.lightdm.enable =
let dmconf = cfg.displayManager;
default = !( dmconf.auto.enable
|| dmconf.gdm.enable
|| dmconf.sddm.enable
|| dmconf.slim.enable
|| dmconf.xpra.enable );
in mkIf (default) true;
hardware.opengl.enable = mkDefault true;
services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];

View File

@ -11,7 +11,6 @@ import ./make-test.nix ({ pkgs, ...} : {
services.xserver.enable = true;
services.xserver.displayManager.slim.enable = false;
services.xserver.displayManager.gdm = {
enable = true;
autoLogin = {

View File

@ -11,6 +11,7 @@ import ./make-test.nix ({ pkgs, ...} : {
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = false;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.displayManager.lightdm.autoLogin.enable = true;
services.xserver.displayManager.lightdm.autoLogin.user = "alice";