From ad4565caa1a8ecaee79295178b07c07273b478d8 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 7 Aug 2019 19:47:07 -0400 Subject: [PATCH] installation-cd-graphical-gnome: updates Note we're not using wayland default in the graphical media because it could cause headaches for Nvidia users. But the session is still available if someone logs out. --- .../installation-cd-graphical-gnome.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix b/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix index 23c3426bff08..62cbdbcfd17b 100644 --- a/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix +++ b/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix @@ -1,5 +1,4 @@ -# This module defines a NixOS installation CD that contains X11 and -# GNOME 3. +# This module defines a NixOS installation CD that contains GNOME. { lib, ... }: @@ -10,10 +9,22 @@ with lib; services.xserver.desktopManager.gnome3.enable = true; - # Auto-login as root. - services.xserver.displayManager.gdm.autoLogin = { + # Wayland can be problematic for some hardware like Nvidia graphics cards. + services.xserver.displayManager.defaultSession = "gnome-xorg"; + + services.xserver.displayManager.gdm = { enable = true; - user = "root"; + # autoSuspend makes the machine automatically suspend after inactivity. + # It's possible someone could/try to ssh'd into the machine and obviously + # have issues because it's inactive. + # See: + # * https://github.com/NixOS/nixpkgs/pull/63790 + # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 + autoSuspend = false; + autoLogin = { + enable = true; + user = "nixos"; + }; }; }