···11# Demo {#sec-profile-demo}
2233This profile just enables a `demo` user, with password `demo`, uid `1000`, `wheel` group and
44-[autologin in the SDDM display manager](#opt-services.xserver.displayManager.autoLogin).
44+[autologin in the SDDM display manager](#opt-services.displayManager.autoLogin).
···44graphical installation CD.
5566It sets [](#opt-services.xserver.enable),
77-[](#opt-services.xserver.displayManager.sddm.enable),
77+[](#opt-services.displayManager.sddm.enable),
88[](#opt-services.xserver.desktopManager.plasma5.enable),
99and [](#opt-services.xserver.libinput.enable) to true. It also
1010includes glxinfo and firefox in the system packages list.
···4040 # If you prefer another desktop manager or display manager, you may want
4141 # to disable the default.
4242 # services.xserver.desktopManager.plasma5.enable = lib.mkForce false;
4343- # services.xserver.displayManager.sddm.enable = lib.mkForce false;
4343+ # services.displayManager.sddm.enable = lib.mkForce false;
44444545 # Enable GDM/GNOME by uncommenting above two lines and two lines below.
4646 # services.xserver.displayManager.gdm.enable = true;
···7171 programs.xwayland.enable = lib.mkDefault true;
72727373 # To make the Miriway session available if a display manager like SDDM is enabled:
7474- services.xserver.displayManager.sessionPackages = [ pkgs.miriway ];
7474+ services.displayManager.sessionPackages = [ pkgs.miriway ];
7575 };
76767777 meta.maintainers = with lib.maintainers; [ OPNA2608 ];
···9393 The services.xserver.displayManager.auto module has been removed
9494 because it was only intended for use in internal NixOS tests, and gave the
9595 false impression of it being a special display manager when it's actually
9696- LightDM. Please use the services.xserver.displayManager.autoLogin options
9696+ LightDM. Please use the services.displayManager.autoLogin options
9797 instead, or any other display manager in NixOS as they all support auto-login.
9898 '')
9999 (mkRemovedOptionModule [ "services" "xserver" "multitouch" ] ''
···9696 pkgs.pantheon.pantheon-agent-geoclue2
9797 ] config.environment.pantheon.excludePackages;
98989999- services.xserver.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ];
9999+ services.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ];
100100101101 # Ensure lightdm is used when Pantheon is enabled
102102 # Without it screen locking will be nonfunctional because of the use of lightlocker
···109109110110 # Without this, elementary LightDM greeter will pre-select non-existent `default` session
111111 # https://github.com/elementary/greeter/issues/368
112112- services.xserver.displayManager.defaultSession = mkDefault "pantheon";
112112+ services.displayManager.defaultSession = mkDefault "pantheon";
113113114114 services.xserver.displayManager.sessionCommands = ''
115115 if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
···60606161 Note that this greeter starts only the default X session.
6262 You can configure the default X session using
6363- [](#opt-services.xserver.displayManager.defaultSession).
6363+ [](#opt-services.displayManager.defaultSession).
6464 '';
6565 };
6666
···639639 ###### implementation
640640641641 config = mkIf cfg.enable {
642642+ services.displayManager.enable = true;
642643643644 services.xserver.displayManager.lightdm.enable =
644645 let dmConf = cfg.displayManager;
645646 default = !(dmConf.gdm.enable
646646- || dmConf.sddm.enable
647647+ || config.services.displayManager.sddm.enable
647648 || dmConf.xpra.enable
648649 || dmConf.sx.enable
649650 || dmConf.startx.enable
650651 || config.services.greetd.enable);
651652 in mkIf (default) (mkDefault true);
652652-653653- # so that the service won't be enabled when only startx is used
654654- systemd.services.display-manager.enable =
655655- let dmConf = cfg.displayManager;
656656- noDmUsed = !(dmConf.gdm.enable
657657- || dmConf.sddm.enable
658658- || dmConf.xpra.enable
659659- || dmConf.lightdm.enable);
660660- in mkIf (noDmUsed) (mkDefault false);
661661-662662- hardware.opengl.enable = mkDefault true;
663653664654 services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ];
665655···694684 # -xkbdir command line option does not seems to be passed to xkbcomp.
695685 "X11/xkb".source = "${cfg.xkb.dir}";
696686 })
697697- # localectl looks into 00-keyboard.conf
698698- //{
699699- "X11/xorg.conf.d/00-keyboard.conf".text = ''
700700- Section "InputClass"
701701- Identifier "Keyboard catchall"
702702- MatchIsKeyboard "on"
703703- Option "XkbModel" "${cfg.xkb.model}"
704704- Option "XkbLayout" "${cfg.xkb.layout}"
705705- Option "XkbOptions" "${cfg.xkb.options}"
706706- Option "XkbVariant" "${cfg.xkb.variant}"
707707- EndSection
708708- '';
709709- }
710687 # Needed since 1.18; see https://bugs.freedesktop.org/show_bug.cgi?id=89023#c5
711688 // (let cfgPath = "X11/xorg.conf.d/10-evdev.conf"; in
712689 {
···726703 xorg.xprop
727704 xorg.xauth
728705 pkgs.xterm
729729- pkgs.xdg-utils
730706 xorg.xf86inputevdev.out # get evdev.4 man page
731731- pkgs.nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more
732707 ] config.services.xserver.excludePackages
733708 ++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh;
734709735710 environment.pathsToLink = [ "/share/X11" ];
736711737737- xdg = {
738738- autostart.enable = true;
739739- menus.enable = true;
740740- mime.enable = true;
741741- icons.enable = true;
742742- };
743743-744744- # The default max inotify watches is 8192.
745745- # Nowadays most apps require a good number of inotify watches,
746746- # the value below is used by default on several other distros.
747747- boot.kernel.sysctl."fs.inotify.max_user_instances" = mkDefault 524288;
748748- boot.kernel.sysctl."fs.inotify.max_user_watches" = mkDefault 524288;
749749-750750- programs.gnupg.agent.pinentryPackage = lib.mkOverride 1100 pkgs.pinentry-gnome3;
751751-752752- systemd.defaultUnit = mkIf cfg.autorun "graphical.target";
753753-754712 systemd.services.display-manager =
755713 { description = "Display Manager";
756714···761719 environment =
762720 optionalAttrs config.hardware.opengl.setLdLibraryPath
763721 { LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; }
764764- // cfg.displayManager.job.environment;
722722+ // config.services.displayManager.environment;
765723766724 preStart =
767725 ''
768768- ${cfg.displayManager.job.preStart}
726726+ ${config.services.displayManager.preStart}
769727770728 rm -f /tmp/.X0-lock
771729 '';
772730773731 # TODO: move declaring the systemd service to its own mkIf
774774- script = mkIf (config.systemd.services.display-manager.enable == true) "${cfg.displayManager.job.execCmd}";
732732+ script = mkIf (config.systemd.services.display-manager.enable == true) "${config.services.displayManager.execCmd}";
775733776734 # Stop restarting if the display manager stops (crashes) 2 times
777735 # in one minute. Starting X typically takes 3-4s.
···910868 ${cfg.extraConfig}
911869 '';
912870913913- fonts.enableDefaultPackages = mkDefault true;
914871 fonts.packages = [
915872 (if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc)
916873 pkgs.xorg.fontmiscmisc
+1-1
nixos/modules/testing/test-instrumentation.nix
···216216 # uses credentials to set passwords on users.
217217 users.users.root.hashedPasswordFile = mkOverride 150 "${pkgs.writeText "hashed-password.root" ""}";
218218219219- services.xserver.displayManager.job.logToJournal = true;
219219+ services.displayManager.logToJournal = true;
220220221221 # Make sure we use the Guest Agent from the QEMU package for testing
222222 # to reduce the closure size required for the tests.