mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
fc035da4a4
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
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
import ./make-test.nix ({ pkgs, ...} : {
|
|
name = "gnome3-gdm";
|
|
meta = with pkgs.stdenv.lib.maintainers; {
|
|
maintainers = [ lethalman ];
|
|
};
|
|
|
|
machine =
|
|
{ ... }:
|
|
|
|
{ imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.displayManager.gdm = {
|
|
enable = true;
|
|
autoLogin = {
|
|
enable = true;
|
|
user = "alice";
|
|
};
|
|
};
|
|
services.xserver.desktopManager.gnome3.enable = true;
|
|
|
|
virtualisation.memorySize = 1024;
|
|
};
|
|
|
|
testScript =
|
|
''
|
|
# wait for gdm to start and bring up X
|
|
$machine->waitForUnit("display-manager.service");
|
|
$machine->waitForX;
|
|
|
|
# wait for alice to be logged in
|
|
$machine->waitForUnit("default.target","alice");
|
|
|
|
# Check that logging in has given the user ownership of devices.
|
|
$machine->succeed("getfacl /dev/snd/timer | grep -q alice");
|
|
|
|
# open a terminal and check it's there
|
|
$machine->succeed("su - alice -c 'DISPLAY=:0.0 XAUTHORITY=/run/user/\$UID/gdm/Xauthority gnome-terminal'");
|
|
$machine->succeed("xauth merge /run/user/1000/gdm/Xauthority");
|
|
$machine->waitForWindow(qr/Terminal/);
|
|
|
|
# wait to get a nice screenshot
|
|
$machine->sleep(20);
|
|
$machine->screenshot("screen");
|
|
'';
|
|
})
|