Merge pull request #291913 from SuperSandro2000/sddm-wayland-only

authored by

Sandro and committed by
GitHub
4cc6ce45 1dd37934

+548 -474
+1 -1
nixos/doc/manual/configuration/modularity.section.md
··· 27 { config, pkgs, ... }: 28 29 { services.xserver.enable = true; 30 - services.xserver.displayManager.sddm.enable = true; 31 services.xserver.desktopManager.plasma5.enable = true; 32 environment.systemPackages = [ pkgs.vim ]; 33 }
··· 27 { config, pkgs, ... }: 28 29 { services.xserver.enable = true; 30 + services.displayManager.sddm.enable = true; 31 services.xserver.desktopManager.plasma5.enable = true; 32 environment.systemPackages = [ pkgs.vim ]; 33 }
+1 -1
nixos/doc/manual/configuration/profiles/demo.section.md
··· 1 # Demo {#sec-profile-demo} 2 3 This profile just enables a `demo` user, with password `demo`, uid `1000`, `wheel` group and 4 - [autologin in the SDDM display manager](#opt-services.xserver.displayManager.autoLogin).
··· 1 # Demo {#sec-profile-demo} 2 3 This profile just enables a `demo` user, with password `demo`, uid `1000`, `wheel` group and 4 + [autologin in the SDDM display manager](#opt-services.displayManager.autoLogin).
+1 -1
nixos/doc/manual/configuration/profiles/graphical.section.md
··· 4 graphical installation CD. 5 6 It sets [](#opt-services.xserver.enable), 7 - [](#opt-services.xserver.displayManager.sddm.enable), 8 [](#opt-services.xserver.desktopManager.plasma5.enable), 9 and [](#opt-services.xserver.libinput.enable) to true. It also 10 includes glxinfo and firefox in the system packages list.
··· 4 graphical installation CD. 5 6 It sets [](#opt-services.xserver.enable), 7 + [](#opt-services.displayManager.sddm.enable), 8 [](#opt-services.xserver.desktopManager.plasma5.enable), 9 and [](#opt-services.xserver.libinput.enable) to true. It also 10 includes glxinfo and firefox in the system packages list.
+4 -4
nixos/doc/manual/configuration/x-windows.chapter.md
··· 45 46 ```nix 47 { 48 - services.xserver.displayManager.sddm.enable = true; 49 services.xserver.displayManager.gdm.enable = true; 50 } 51 ``` ··· 99 100 ```nix 101 { 102 - services.xserver.displayManager.defaultSession = "none+i3"; 103 } 104 ``` 105 ··· 109 ```nix 110 { 111 services.xserver.displayManager.lightdm.enable = true; 112 - services.xserver.displayManager.autoLogin.enable = true; 113 - services.xserver.displayManager.autoLogin.user = "alice"; 114 } 115 ``` 116
··· 45 46 ```nix 47 { 48 + services.displayManager.sddm.enable = true; 49 services.xserver.displayManager.gdm.enable = true; 50 } 51 ``` ··· 99 100 ```nix 101 { 102 + services.displayManager.defaultSession = "none+i3"; 103 } 104 ``` 105 ··· 109 ```nix 110 { 111 services.xserver.displayManager.lightdm.enable = true; 112 + services.displayManager.autoLogin.enable = true; 113 + services.displayManager.autoLogin.user = "alice"; 114 } 115 ``` 116
+1 -1
nixos/doc/manual/configuration/xfce.chapter.md
··· 5 ```nix 6 { 7 services.xserver.desktopManager.xfce.enable = true; 8 - services.xserver.displayManager.defaultSession = "xfce"; 9 } 10 ``` 11
··· 5 ```nix 6 { 7 services.xserver.desktopManager.xfce.enable = true; 8 + services.displayManager.defaultSession = "xfce"; 9 } 10 ``` 11
+14 -15
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix
··· 35 QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")"; 36 }; 37 38 - services.xserver.displayManager = { 39 - gdm = { 40 - enable = true; 41 - # autoSuspend makes the machine automatically suspend after inactivity. 42 - # It's possible someone could/try to ssh'd into the machine and obviously 43 - # have issues because it's inactive. 44 - # See: 45 - # * https://github.com/NixOS/nixpkgs/pull/63790 46 - # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 47 - autoSuspend = false; 48 - }; 49 - autoLogin = { 50 - enable = true; 51 - user = "nixos"; 52 - }; 53 }; 54 }
··· 35 QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")"; 36 }; 37 38 + services.xserver.displayManager.gdm = { 39 + enable = true; 40 + # autoSuspend makes the machine automatically suspend after inactivity. 41 + # It's possible someone could/try to ssh'd into the machine and obviously 42 + # have issues because it's inactive. 43 + # See: 44 + # * https://github.com/NixOS/nixpkgs/pull/63790 45 + # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 46 + autoSuspend = false; 47 + }; 48 + 49 + services.displayManager.autoLogin = { 50 + enable = true; 51 + user = "nixos"; 52 }; 53 }
+9 -11
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix
··· 8 9 isoImage.edition = "plasma5"; 10 11 - services.xserver = { 12 - desktopManager.plasma5 = { 13 - enable = true; 14 - }; 15 16 - # Automatically login as nixos. 17 - displayManager = { 18 - sddm.enable = true; 19 - autoLogin = { 20 - enable = true; 21 - user = "nixos"; 22 - }; 23 }; 24 }; 25
··· 8 9 isoImage.edition = "plasma5"; 10 11 + services.xserver.desktopManager.plasma5 = { 12 + enable = true; 13 + }; 14 15 + # Automatically login as nixos. 16 + services.displayManager = { 17 + sddm.enable = true; 18 + autoLogin = { 19 + enable = true; 20 + user = "nixos"; 21 }; 22 }; 23
+7 -9
nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix
··· 7 8 isoImage.edition = "plasma6"; 9 10 - services.xserver = { 11 - desktopManager.plasma6.enable = true; 12 13 - # Automatically login as nixos. 14 - displayManager = { 15 - sddm.enable = true; 16 - autoLogin = { 17 - enable = true; 18 - user = "nixos"; 19 - }; 20 }; 21 }; 22
··· 7 8 isoImage.edition = "plasma6"; 9 10 + services.desktopManager.plasma6.enable = true; 11 12 + # Automatically login as nixos. 13 + services.displayManager = { 14 + sddm.enable = true; 15 + autoLogin = { 16 + enable = true; 17 + user = "nixos"; 18 }; 19 }; 20
+13 -15
nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
··· 16 enable = true; 17 }; 18 19 - services.xserver.displayManager = { 20 - gdm = { 21 - enable = true; 22 - # autoSuspend makes the machine automatically suspend after inactivity. 23 - # It's possible someone could/try to ssh'd into the machine and obviously 24 - # have issues because it's inactive. 25 - # See: 26 - # * https://github.com/NixOS/nixpkgs/pull/63790 27 - # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 28 - autoSuspend = false; 29 - }; 30 - autoLogin = { 31 - enable = true; 32 - user = "nixos"; 33 - }; 34 }; 35 36 }
··· 16 enable = true; 17 }; 18 19 + services.xserver.displayManager.gdm = { 20 + enable = true; 21 + # autoSuspend makes the machine automatically suspend after inactivity. 22 + # It's possible someone could/try to ssh'd into the machine and obviously 23 + # have issues because it's inactive. 24 + # See: 25 + # * https://github.com/NixOS/nixpkgs/pull/63790 26 + # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22 27 + autoSuspend = false; 28 }; 29 30 + services.displayManager.autoLogin = { 31 + enable = true; 32 + user = "nixos"; 33 + }; 34 }
+9 -11
nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix
··· 8 9 isoImage.edition = "plasma5"; 10 11 - services.xserver = { 12 - desktopManager.plasma5 = { 13 - enable = true; 14 - }; 15 16 - # Automatically login as nixos. 17 - displayManager = { 18 - sddm.enable = true; 19 - autoLogin = { 20 - enable = true; 21 - user = "nixos"; 22 - }; 23 }; 24 }; 25
··· 8 9 isoImage.edition = "plasma5"; 10 11 + services.xserver.desktopManager.plasma5 = { 12 + enable = true; 13 + }; 14 15 + # Automatically login as nixos. 16 + services.displayManager = { 17 + sddm.enable = true; 18 + autoLogin = { 19 + enable = true; 20 + user = "nixos"; 21 }; 22 }; 23
+1 -1
nixos/modules/installer/virtualbox-demo.nix
··· 40 # If you prefer another desktop manager or display manager, you may want 41 # to disable the default. 42 # services.xserver.desktopManager.plasma5.enable = lib.mkForce false; 43 - # services.xserver.displayManager.sddm.enable = lib.mkForce false; 44 45 # Enable GDM/GNOME by uncommenting above two lines and two lines below. 46 # services.xserver.displayManager.gdm.enable = true;
··· 40 # If you prefer another desktop manager or display manager, you may want 41 # to disable the default. 42 # services.xserver.desktopManager.plasma5.enable = lib.mkForce false; 43 + # services.displayManager.sddm.enable = lib.mkForce false; 44 45 # Enable GDM/GNOME by uncommenting above two lines and two lines below. 46 # services.xserver.displayManager.gdm.enable = true;
+3 -1
nixos/modules/module-list.nix
··· 508 ./services/development/nixseparatedebuginfod.nix 509 ./services/development/rstudio-server/default.nix 510 ./services/development/zammad.nix 511 ./services/display-managers/greetd.nix 512 ./services/editors/emacs.nix 513 ./services/editors/haste.nix 514 ./services/editors/infinoted.nix ··· 708 ./services/misc/gogs.nix 709 ./services/misc/gollum.nix 710 ./services/misc/gpsd.nix 711 ./services/misc/greenclip.nix 712 ./services/misc/guix 713 ./services/misc/headphones.nix ··· 1444 ./services/x11/display-managers/default.nix 1445 ./services/x11/display-managers/gdm.nix 1446 ./services/x11/display-managers/lightdm.nix 1447 - ./services/x11/display-managers/sddm.nix 1448 ./services/x11/display-managers/slim.nix 1449 ./services/x11/display-managers/startx.nix 1450 ./services/x11/display-managers/sx.nix
··· 508 ./services/development/nixseparatedebuginfod.nix 509 ./services/development/rstudio-server/default.nix 510 ./services/development/zammad.nix 511 + ./services/display-managers/default.nix 512 ./services/display-managers/greetd.nix 513 + ./services/display-managers/sddm.nix 514 ./services/editors/emacs.nix 515 ./services/editors/haste.nix 516 ./services/editors/infinoted.nix ··· 710 ./services/misc/gogs.nix 711 ./services/misc/gollum.nix 712 ./services/misc/gpsd.nix 713 + ./services/misc/graphical-desktop.nix 714 ./services/misc/greenclip.nix 715 ./services/misc/guix 716 ./services/misc/headphones.nix ··· 1447 ./services/x11/display-managers/default.nix 1448 ./services/x11/display-managers/gdm.nix 1449 ./services/x11/display-managers/lightdm.nix 1450 ./services/x11/display-managers/slim.nix 1451 ./services/x11/display-managers/startx.nix 1452 ./services/x11/display-managers/sx.nix
+1 -1
nixos/modules/programs/miriway.nix
··· 71 programs.xwayland.enable = lib.mkDefault true; 72 73 # To make the Miriway session available if a display manager like SDDM is enabled: 74 - services.xserver.displayManager.sessionPackages = [ pkgs.miriway ]; 75 }; 76 77 meta.maintainers = with lib.maintainers; [ OPNA2608 ];
··· 71 programs.xwayland.enable = lib.mkDefault true; 72 73 # To make the Miriway session available if a display manager like SDDM is enabled: 74 + services.displayManager.sessionPackages = [ pkgs.miriway ]; 75 }; 76 77 meta.maintainers = with lib.maintainers; [ OPNA2608 ];
+1 -1
nixos/modules/programs/steam.nix
··· 161 }; 162 163 programs.gamescope.enable = mkDefault cfg.gamescopeSession.enable; 164 - services.xserver.displayManager.sessionPackages = mkIf cfg.gamescopeSession.enable [ gamescopeSessionFile ]; 165 166 # optionally enable 32bit pulseaudio support if pulseaudio is enabled 167 hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
··· 161 }; 162 163 programs.gamescope.enable = mkDefault cfg.gamescopeSession.enable; 164 + services.displayManager.sessionPackages = mkIf cfg.gamescopeSession.enable [ gamescopeSessionFile ]; 165 166 # optionally enable 32bit pulseaudio support if pulseaudio is enabled 167 hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
+1 -1
nixos/modules/programs/wayland/cardboard.nix
··· 17 environment.systemPackages = [ cfg.package ]; 18 19 # To make a cardboard session available for certain DMs like SDDM 20 - services.xserver.displayManager.sessionPackages = [ cfg.package ]; 21 } 22 (import ./wayland-session.nix { inherit lib pkgs; }) 23 ]);
··· 17 environment.systemPackages = [ cfg.package ]; 18 19 # To make a cardboard session available for certain DMs like SDDM 20 + services.displayManager.sessionPackages = [ cfg.package ]; 21 } 22 (import ./wayland-session.nix { inherit lib pkgs; }) 23 ]);
+1 -1
nixos/modules/programs/wayland/hyprland.nix
··· 66 67 security.polkit.enable = true; 68 69 - services.xserver.displayManager.sessionPackages = [ cfg.finalPackage ]; 70 71 xdg.portal = { 72 enable = mkDefault true;
··· 66 67 security.polkit.enable = true; 68 69 + services.displayManager.sessionPackages = [ cfg.finalPackage ]; 70 71 xdg.portal = { 72 enable = mkDefault true;
+1 -1
nixos/modules/programs/wayland/labwc.nix
··· 18 xdg.portal.config.wlroots.default = lib.mkDefault [ "wlr" "gtk" ]; 19 20 # To make a labwc session available for certain DMs like SDDM 21 - services.xserver.displayManager.sessionPackages = [ cfg.package ]; 22 } 23 (import ./wayland-session.nix { inherit lib pkgs; }) 24 ]);
··· 18 xdg.portal.config.wlroots.default = lib.mkDefault [ "wlr" "gtk" ]; 19 20 # To make a labwc session available for certain DMs like SDDM 21 + services.displayManager.sessionPackages = [ cfg.package ]; 22 } 23 (import ./wayland-session.nix { inherit lib pkgs; }) 24 ]);
+1 -1
nixos/modules/programs/wayland/river.nix
··· 47 environment.systemPackages = optional (cfg.package != null) cfg.package ++ cfg.extraPackages; 48 49 # To make a river session available if a display manager like SDDM is enabled: 50 - services.xserver.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; 51 52 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913 53 xdg.portal.config.river.default = mkDefault [ "wlr" "gtk" ];
··· 47 environment.systemPackages = optional (cfg.package != null) cfg.package ++ cfg.extraPackages; 48 49 # To make a river session available if a display manager like SDDM is enabled: 50 + services.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; 51 52 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050913 53 xdg.portal.config.river.default = mkDefault [ "wlr" "gtk" ];
+1 -1
nixos/modules/programs/wayland/sway.nix
··· 174 xdg.portal.config.sway.default = mkDefault [ "wlr" "gtk" ]; 175 176 # To make a Sway session available if a display manager like SDDM is enabled: 177 - services.xserver.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; } 178 (import ./wayland-session.nix { inherit lib pkgs; }) 179 ]); 180
··· 174 xdg.portal.config.sway.default = mkDefault [ "wlr" "gtk" ]; 175 176 # To make a Sway session available if a display manager like SDDM is enabled: 177 + services.displayManager.sessionPackages = optionals (cfg.package != null) [ cfg.package ]; } 178 (import ./wayland-session.nix { inherit lib pkgs; }) 179 ]); 180
+1 -1
nixos/modules/programs/wayland/wayfire.nix
··· 38 finalPackage 39 ]; 40 41 - services.xserver.displayManager.sessionPackages = [ finalPackage ]; 42 43 xdg.portal = { 44 enable = lib.mkDefault true;
··· 38 finalPackage 39 ]; 40 41 + services.displayManager.sessionPackages = [ finalPackage ]; 42 43 xdg.portal = { 44 enable = lib.mkDefault true;
+1 -1
nixos/modules/rename.nix
··· 93 The services.xserver.displayManager.auto module has been removed 94 because it was only intended for use in internal NixOS tests, and gave the 95 false impression of it being a special display manager when it's actually 96 - LightDM. Please use the services.xserver.displayManager.autoLogin options 97 instead, or any other display manager in NixOS as they all support auto-login. 98 '') 99 (mkRemovedOptionModule [ "services" "xserver" "multitouch" ] ''
··· 93 The services.xserver.displayManager.auto module has been removed 94 because it was only intended for use in internal NixOS tests, and gave the 95 false impression of it being a special display manager when it's actually 96 + LightDM. Please use the services.displayManager.autoLogin options 97 instead, or any other display manager in NixOS as they all support auto-login. 98 '') 99 (mkRemovedOptionModule [ "services" "xserver" "multitouch" ] ''
+2 -2
nixos/modules/services/desktop-managers/plasma6.nix
··· 246 xdg.portal.configPackages = mkDefault [kdePackages.xdg-desktop-portal-kde]; 247 services.pipewire.enable = mkDefault true; 248 249 - services.xserver.displayManager = { 250 sessionPackages = [kdePackages.plasma-workspace]; 251 defaultSession = mkDefault "plasma"; 252 }; 253 - services.xserver.displayManager.sddm = { 254 package = kdePackages.sddm; 255 theme = mkDefault "breeze"; 256 wayland.compositor = "kwin";
··· 246 xdg.portal.configPackages = mkDefault [kdePackages.xdg-desktop-portal-kde]; 247 services.pipewire.enable = mkDefault true; 248 249 + services.displayManager = { 250 sessionPackages = [kdePackages.plasma-workspace]; 251 defaultSession = mkDefault "plasma"; 252 }; 253 + services.displayManager.sddm = { 254 package = kdePackages.sddm; 255 theme = mkDefault "breeze"; 256 wayland.compositor = "kwin";
+257
nixos/modules/services/display-managers/default.nix
···
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + let 4 + cfg = config.services.displayManager; 5 + 6 + installedSessions = pkgs.runCommand "desktops" 7 + { # trivial derivation 8 + preferLocalBuild = true; 9 + allowSubstitutes = false; 10 + } 11 + '' 12 + mkdir -p "$out/share/"{xsessions,wayland-sessions} 13 + 14 + ${lib.concatMapStrings (pkg: '' 15 + for n in ${lib.concatStringsSep " " pkg.providedSessions}; do 16 + if ! test -f ${pkg}/share/wayland-sessions/$n.desktop -o \ 17 + -f ${pkg}/share/xsessions/$n.desktop; then 18 + echo "Couldn't find provided session name, $n.desktop, in session package ${pkg.name}:" 19 + echo " ${pkg}" 20 + return 1 21 + fi 22 + done 23 + 24 + if test -d ${pkg}/share/xsessions; then 25 + ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions 26 + fi 27 + if test -d ${pkg}/share/wayland-sessions; then 28 + ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions 29 + fi 30 + '') cfg.sessionPackages} 31 + ''; 32 + 33 + dmDefault = config.services.xserver.desktopManager.default; 34 + # fallback default for cases when only default wm is set 35 + dmFallbackDefault = if dmDefault != null then dmDefault else "none"; 36 + wmDefault = config.services.xserver.windowManager.default; 37 + defaultSessionFromLegacyOptions = dmFallbackDefault + lib.optionalString (wmDefault != null && wmDefault != "none") "+${wmDefault}"; 38 + in 39 + { 40 + options = { 41 + services.displayManager = { 42 + enable = lib.mkEnableOption "systemd's display-manager service"; 43 + 44 + preStart = lib.mkOption { 45 + type = lib.types.lines; 46 + default = ""; 47 + example = "rm -f /var/log/my-display-manager.log"; 48 + description = lib.mdDoc "Script executed before the display manager is started."; 49 + }; 50 + 51 + execCmd = lib.mkOption { 52 + type = lib.types.str; 53 + example = lib.literalExpression ''"''${pkgs.lightdm}/bin/lightdm"''; 54 + description = lib.mdDoc "Command to start the display manager."; 55 + }; 56 + 57 + environment = lib.mkOption { 58 + type = with lib.types; attrsOf unspecified; 59 + default = {}; 60 + description = lib.mdDoc "Additional environment variables needed by the display manager."; 61 + }; 62 + 63 + hiddenUsers = lib.mkOption { 64 + type = with lib.types; listOf str; 65 + default = [ "nobody" ]; 66 + description = lib.mdDoc '' 67 + A list of users which will not be shown in the display manager. 68 + ''; 69 + }; 70 + 71 + logToFile = lib.mkOption { 72 + type = lib.types.bool; 73 + default = false; 74 + description = lib.mdDoc '' 75 + Whether the display manager redirects the output of the 76 + session script to {file}`~/.xsession-errors`. 77 + ''; 78 + }; 79 + 80 + logToJournal = lib.mkOption { 81 + type = lib.types.bool; 82 + default = true; 83 + description = lib.mdDoc '' 84 + Whether the display manager redirects the output of the 85 + session script to the systemd journal. 86 + ''; 87 + }; 88 + 89 + # Configuration for automatic login. Common for all DM. 90 + autoLogin = lib.mkOption { 91 + type = lib.types.submodule ({ config, options, ... }: { 92 + options = { 93 + enable = lib.mkOption { 94 + type = lib.types.bool; 95 + default = config.user != null; 96 + defaultText = lib.literalExpression "config.${options.user} != null"; 97 + description = lib.mdDoc '' 98 + Automatically log in as {option}`autoLogin.user`. 99 + ''; 100 + }; 101 + 102 + user = lib.mkOption { 103 + type = with lib.types; nullOr str; 104 + default = null; 105 + description = lib.mdDoc '' 106 + User to be used for the automatic login. 107 + ''; 108 + }; 109 + }; 110 + }); 111 + 112 + default = {}; 113 + description = lib.mdDoc '' 114 + Auto login configuration attrset. 115 + ''; 116 + }; 117 + 118 + defaultSession = lib.mkOption { 119 + type = lib.types.nullOr lib.types.str // { 120 + description = "session name"; 121 + check = d: 122 + lib.assertMsg (d != null -> (lib.types.str.check d && lib.elem d config.services.displayManager.sessionData.sessionNames)) '' 123 + Default graphical session, '${d}', not found. 124 + Valid names for 'services.displayManager.defaultSession' are: 125 + ${lib.concatStringsSep "\n " cfg.displayManager.sessionData.sessionNames} 126 + ''; 127 + }; 128 + default = 129 + if dmDefault != null || wmDefault != null then 130 + defaultSessionFromLegacyOptions 131 + else 132 + null; 133 + defaultText = lib.literalMD '' 134 + Taken from display manager settings or window manager settings, if either is set. 135 + ''; 136 + example = "gnome"; 137 + description = lib.mdDoc '' 138 + Graphical session to pre-select in the session chooser (only effective for GDM, LightDM and SDDM). 139 + 140 + On GDM, LightDM and SDDM, it will also be used as a session for auto-login. 141 + ''; 142 + }; 143 + 144 + sessionData = lib.mkOption { 145 + description = lib.mdDoc "Data exported for display managers’ convenience"; 146 + internal = true; 147 + default = {}; 148 + }; 149 + 150 + sessionPackages = lib.mkOption { 151 + type = lib.types.listOf (lib.types.package // { 152 + description = "package with provided sessions"; 153 + check = p: lib.assertMsg 154 + (lib.types.package.check p && p ? providedSessions 155 + && p.providedSessions != [] && lib.all lib.isString p.providedSessions) 156 + '' 157 + Package, '${p.name}', did not specify any session names, as strings, in 158 + 'passthru.providedSessions'. This is required when used as a session package. 159 + 160 + The session names can be looked up in: 161 + ${p}/share/xsessions 162 + ${p}/share/wayland-sessions 163 + ''; 164 + }); 165 + default = []; 166 + description = lib.mdDoc '' 167 + A list of packages containing x11 or wayland session files to be passed to the display manager. 168 + ''; 169 + }; 170 + }; 171 + }; 172 + 173 + imports = [ 174 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "autoLogin" ] [ "services" "displayManager" "autoLogin" ]) 175 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "defaultSession" ] [ "services" "displayManager" "defaultSession" ]) 176 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "environment" ] [ "services" "displayManager" "environment" ]) 177 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "execCmd" ] [ "services" "displayManager" "execCmd" ]) 178 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logToFile" ] [ "services" "displayManager" "logToFile" ]) 179 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logToJournal" ] [ "services" "displayManager" "logToJournal" ]) 180 + (lib.mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "preStart" ] [ "services" "displayManager" "preStart" ]) 181 + ]; 182 + 183 + config = lib.mkIf cfg.enable { 184 + assertions = [ 185 + { assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null; 186 + message = '' 187 + services.displayManager.autoLogin.enable requires services.displayManager.autoLogin.user to be set 188 + ''; 189 + } 190 + ]; 191 + 192 + warnings = 193 + lib.mkIf (dmDefault != null || wmDefault != null) [ 194 + '' 195 + The following options are deprecated: 196 + ${lib.concatStringsSep "\n " (map ({c, t}: t) (lib.filter ({c, t}: c != null) [ 197 + { c = dmDefault; t = "- services.xserver.desktopManager.default"; } 198 + { c = wmDefault; t = "- services.xserver.windowManager.default"; } 199 + ]))} 200 + Please use 201 + services.displayManager.defaultSession = "${defaultSessionFromLegacyOptions}"; 202 + instead. 203 + '' 204 + ]; 205 + 206 + # Make xsessions and wayland sessions available in XDG_DATA_DIRS 207 + # as some programs have behavior that depends on them being present 208 + environment.sessionVariables.XDG_DATA_DIRS = lib.mkIf (cfg.sessionPackages != [ ]) [ 209 + "${cfg.sessionData.desktops}/share" 210 + ]; 211 + 212 + services.displayManager.sessionData = { 213 + desktops = installedSessions; 214 + sessionNames = lib.concatMap (p: p.providedSessions) config.services.displayManager.sessionPackages; 215 + # We do not want to force users to set defaultSession when they have only single DE. 216 + autologinSession = 217 + if cfg.defaultSession != null then 218 + cfg.defaultSession 219 + else if cfg.sessionData.sessionNames != [] then 220 + lib.head cfg.sessionData.sessionNames 221 + else 222 + null; 223 + }; 224 + 225 + # so that the service won't be enabled when only startx is used 226 + systemd.services.display-manager.enable = 227 + let dmConf = config.services.xserver.displayManager; 228 + noDmUsed = !(dmConf.gdm.enable 229 + || cfg.sddm.enable 230 + || dmConf.xpra.enable 231 + || dmConf.lightdm.enable); 232 + in lib.mkIf noDmUsed (lib.mkDefault false); 233 + 234 + systemd.services.display-manager = { 235 + description = "Display Manager"; 236 + after = [ "acpid.service" "systemd-logind.service" "systemd-user-sessions.service" ]; 237 + restartIfChanged = false; 238 + 239 + environment = lib.optionalAttrs config.hardware.opengl.setLdLibraryPath { 240 + LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; 241 + } // cfg.environment; 242 + 243 + preStart = cfg.preStart; 244 + script = lib.mkIf (config.systemd.services.display-manager.enable == true) cfg.execCmd; 245 + 246 + # Stop restarting if the display manager stops (crashes) 2 times 247 + # in one minute. Starting X typically takes 3-4s. 248 + startLimitIntervalSec = 30; 249 + startLimitBurst = 3; 250 + serviceConfig = { 251 + Restart = "always"; 252 + RestartSec = "200ms"; 253 + SyslogIdentifier = "display-manager"; 254 + }; 255 + }; 256 + }; 257 + }
+54
nixos/modules/services/misc/graphical-desktop.nix
···
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 7 + let 8 + xcfg = config.services.xserver; 9 + dmcfg = config.services.displayManager; 10 + in 11 + { 12 + config = lib.mkIf (xcfg.enable || dmcfg.enable) { 13 + # The default max inotify watches is 8192. 14 + # Nowadays most apps require a good number of inotify watches, 15 + # the value below is used by default on several other distros. 16 + boot.kernel.sysctl = { 17 + "fs.inotify.max_user_instances" = lib.mkDefault 524288; 18 + "fs.inotify.max_user_watches" = lib.mkDefault 524288; 19 + }; 20 + 21 + environment = { 22 + # localectl looks into 00-keyboard.conf 23 + etc."X11/xorg.conf.d/00-keyboard.conf".text = '' 24 + Section "InputClass" 25 + Identifier "Keyboard catchall" 26 + MatchIsKeyboard "on" 27 + Option "XkbModel" "${xcfg.xkb.model}" 28 + Option "XkbLayout" "${xcfg.xkb.layout}" 29 + Option "XkbOptions" "${xcfg.xkb.options}" 30 + Option "XkbVariant" "${xcfg.xkb.variant}" 31 + EndSection 32 + ''; 33 + systemPackages = with pkgs; [ 34 + nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more 35 + xdg-utils 36 + ]; 37 + }; 38 + 39 + fonts.enableDefaultPackages = lib.mkDefault true; 40 + 41 + hardware.opengl.enable = lib.mkDefault true; 42 + 43 + programs.gnupg.agent.pinentryPackage = lib.mkOverride 1100 pkgs.pinentry-gnome3; 44 + 45 + systemd.defaultUnit = lib.mkIf (xcfg.autorun || dmcfg.enable) "graphical.target"; 46 + 47 + xdg = { 48 + autostart.enable = true; 49 + menus.enable = true; 50 + mime.enable = true; 51 + icons.enable = true; 52 + }; 53 + }; 54 + }
+1 -1
nixos/modules/services/system/nix-daemon.nix
··· 247 248 users.users = nixbldUsers; 249 250 - services.xserver.displayManager.hiddenUsers = attrNames nixbldUsers; 251 252 # Legacy configuration conversion. 253 nix.settings = mkMerge [
··· 247 248 users.users = nixbldUsers; 249 250 + services.displayManager.hiddenUsers = attrNames nixbldUsers; 251 252 # Legacy configuration conversion. 253 nix.settings = mkMerge [
+1 -1
nixos/modules/services/x11/desktop-managers/budgie.nix
··· 91 }; 92 93 config = mkIf cfg.enable { 94 - services.xserver.displayManager.sessionPackages = with pkgs; [ 95 budgie.budgie-desktop 96 ]; 97
··· 91 }; 92 93 config = mkIf cfg.enable { 94 + services.displayManager.sessionPackages = with pkgs; [ 95 budgie.budgie-desktop 96 ]; 97
+1 -1
nixos/modules/services/x11/desktop-managers/cinnamon.nix
··· 60 61 config = mkMerge [ 62 (mkIf cfg.enable { 63 - services.xserver.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ]; 64 65 services.xserver.displayManager.lightdm.greeters.slick = { 66 enable = mkDefault true;
··· 60 61 config = mkMerge [ 62 (mkIf cfg.enable { 63 + services.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ]; 64 65 services.xserver.displayManager.lightdm.greeters.slick = { 66 enable = mkDefault true;
+2 -2
nixos/modules/services/x11/desktop-managers/deepin.nix
··· 38 39 config = mkIf cfg.enable 40 { 41 - services.xserver.displayManager.sessionPackages = [ pkgs.deepin.dde-session ]; 42 - services.xserver.displayManager.defaultSession = mkDefault "dde-x11"; 43 44 # Update the DBus activation environment after launching the desktop manager. 45 services.xserver.displayManager.sessionCommands = ''
··· 38 39 config = mkIf cfg.enable 40 { 41 + services.displayManager.sessionPackages = [ pkgs.deepin.dde-session ]; 42 + services.displayManager.defaultSession = mkDefault "dde-x11"; 43 44 # Update the DBus activation environment after launching the desktop manager. 45 services.xserver.displayManager.sessionCommands = ''
+1 -1
nixos/modules/services/x11/desktop-managers/default.nix
··· 87 default = null; 88 example = "none"; 89 description = lib.mdDoc '' 90 - **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead. 91 92 Default desktop manager loaded if none have been chosen. 93 '';
··· 87 default = null; 88 example = "none"; 89 description = lib.mdDoc '' 90 + **Deprecated**, please use [](#opt-services.displayManager.defaultSession) instead. 91 92 Default desktop manager loaded if none have been chosen. 93 '';
+1 -1
nixos/modules/services/x11/desktop-managers/enlightenment.nix
··· 54 "/share/locale" 55 ]; 56 57 - services.xserver.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ]; 58 59 services.xserver.displayManager.sessionCommands = '' 60 if test "$XDG_CURRENT_DESKTOP" = "Enlightenment"; then
··· 54 "/share/locale" 55 ]; 56 57 + services.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ]; 58 59 services.xserver.displayManager.sessionCommands = '' 60 if test "$XDG_CURRENT_DESKTOP" = "Enlightenment"; then
+2 -2
nixos/modules/services/x11/desktop-managers/gnome.nix
··· 261 services.gnome.core-shell.enable = true; 262 services.gnome.core-utilities.enable = mkDefault true; 263 264 - services.xserver.displayManager.sessionPackages = [ pkgs.gnome.gnome-session.sessions ]; 265 266 environment.extraInit = '' 267 ${concatMapStrings (p: '' ··· 285 }) 286 287 (mkIf flashbackEnabled { 288 - services.xserver.displayManager.sessionPackages = 289 let 290 wmNames = map (wm: wm.wmName) flashbackWms; 291 namesAreUnique = lib.unique wmNames == wmNames;
··· 261 services.gnome.core-shell.enable = true; 262 services.gnome.core-utilities.enable = mkDefault true; 263 264 + services.displayManager.sessionPackages = [ pkgs.gnome.gnome-session.sessions ]; 265 266 environment.extraInit = '' 267 ${concatMapStrings (p: '' ··· 285 }) 286 287 (mkIf flashbackEnabled { 288 + services.displayManager.sessionPackages = 289 let 290 wmNames = map (wm: wm.wmName) flashbackWms; 291 namesAreUnique = lib.unique wmNames == wmNames;
+1 -1
nixos/modules/services/x11/desktop-managers/lumina.nix
··· 27 28 config = mkIf cfg.enable { 29 30 - services.xserver.displayManager.sessionPackages = [ 31 pkgs.lumina.lumina 32 ]; 33
··· 27 28 config = mkIf cfg.enable { 29 30 + services.displayManager.sessionPackages = [ 31 pkgs.lumina.lumina 32 ]; 33
+2 -2
nixos/modules/services/x11/desktop-managers/mate.nix
··· 49 50 config = mkMerge [ 51 (mkIf (cfg.enable || cfg.enableWaylandSession) { 52 - services.xserver.displayManager.sessionPackages = [ 53 pkgs.mate.mate-session-manager 54 ]; 55 ··· 103 environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${pkgs.mate.mate-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; 104 105 environment.systemPackages = [ pkgs.mate.mate-wayland-session ]; 106 - services.xserver.displayManager.sessionPackages = [ pkgs.mate.mate-wayland-session ]; 107 }) 108 ]; 109 }
··· 49 50 config = mkMerge [ 51 (mkIf (cfg.enable || cfg.enableWaylandSession) { 52 + services.displayManager.sessionPackages = [ 53 pkgs.mate.mate-session-manager 54 ]; 55 ··· 103 environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${pkgs.mate.mate-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; 104 105 environment.systemPackages = [ pkgs.mate.mate-wayland-session ]; 106 + services.displayManager.sessionPackages = [ pkgs.mate.mate-wayland-session ]; 107 }) 108 ]; 109 }
+2 -2
nixos/modules/services/x11/desktop-managers/pantheon.nix
··· 96 pkgs.pantheon.pantheon-agent-geoclue2 97 ] config.environment.pantheon.excludePackages; 98 99 - services.xserver.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ]; 100 101 # Ensure lightdm is used when Pantheon is enabled 102 # Without it screen locking will be nonfunctional because of the use of lightlocker ··· 109 110 # Without this, elementary LightDM greeter will pre-select non-existent `default` session 111 # https://github.com/elementary/greeter/issues/368 112 - services.xserver.displayManager.defaultSession = mkDefault "pantheon"; 113 114 services.xserver.displayManager.sessionCommands = '' 115 if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
··· 96 pkgs.pantheon.pantheon-agent-geoclue2 97 ] config.environment.pantheon.excludePackages; 98 99 + services.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ]; 100 101 # Ensure lightdm is used when Pantheon is enabled 102 # Without it screen locking will be nonfunctional because of the use of lightlocker ··· 109 110 # Without this, elementary LightDM greeter will pre-select non-existent `default` session 111 # https://github.com/elementary/greeter/issues/368 112 + services.displayManager.defaultSession = mkDefault "pantheon"; 113 114 services.xserver.displayManager.sessionCommands = '' 115 if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then
+1 -1
nixos/modules/services/x11/desktop-managers/phosh.nix
··· 220 221 services.gnome.core-shell.enable = true; 222 services.gnome.core-os-services.enable = true; 223 - services.xserver.displayManager.sessionPackages = [ cfg.package ]; 224 225 environment.etc."phosh/phoc.ini".source = 226 if builtins.isPath cfg.phocConfig then cfg.phocConfig
··· 220 221 services.gnome.core-shell.enable = true; 222 services.gnome.core-os-services.enable = true; 223 + services.displayManager.sessionPackages = [ cfg.package ]; 224 225 environment.etc."phosh/phoc.ini".source = 226 if builtins.isPath cfg.phocConfig then cfg.phocConfig
+6 -6
nixos/modules/services/x11/desktop-managers/plasma5.nix
··· 357 pkgs.media-player-info 358 ]; 359 360 - services.xserver.displayManager.sddm = { 361 theme = mkDefault "breeze"; 362 }; 363 ··· 403 system.nixos-generate-config.desktopConfiguration = [ 404 '' 405 # Enable the Plasma 5 Desktop Environment. 406 - services.xserver.displayManager.sddm.enable = true; 407 services.xserver.desktopManager.plasma5.enable = true; 408 '' 409 ]; 410 411 - services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-workspace ]; 412 # Default to be `plasma` (X11) instead of `plasmawayland`, since plasma wayland currently has 413 # many tiny bugs. 414 # See: https://github.com/NixOS/nixpkgs/issues/143272 415 - services.xserver.displayManager.defaultSession = mkDefault "plasma"; 416 417 environment.systemPackages = 418 with pkgs.plasma5Packages; ··· 538 }; 539 }; 540 541 - services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-mobile ]; 542 }) 543 544 # Plasma Bigscreen ··· 559 kdeconnect-kde 560 ]; 561 562 - services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-bigscreen ]; 563 564 # required for plasma-remotecontrollers to work correctly 565 hardware.uinput.enable = true;
··· 357 pkgs.media-player-info 358 ]; 359 360 + services.displayManager.sddm = { 361 theme = mkDefault "breeze"; 362 }; 363 ··· 403 system.nixos-generate-config.desktopConfiguration = [ 404 '' 405 # Enable the Plasma 5 Desktop Environment. 406 + services.displayManager.sddm.enable = true; 407 services.xserver.desktopManager.plasma5.enable = true; 408 '' 409 ]; 410 411 + services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-workspace ]; 412 # Default to be `plasma` (X11) instead of `plasmawayland`, since plasma wayland currently has 413 # many tiny bugs. 414 # See: https://github.com/NixOS/nixpkgs/issues/143272 415 + services.displayManager.defaultSession = mkDefault "plasma"; 416 417 environment.systemPackages = 418 with pkgs.plasma5Packages; ··· 538 }; 539 }; 540 541 + services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-mobile ]; 542 }) 543 544 # Plasma Bigscreen ··· 559 kdeconnect-kde 560 ]; 561 562 + services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-bigscreen ]; 563 564 # required for plasma-remotecontrollers to work correctly 565 hardware.uinput.enable = true;
+1 -1
nixos/modules/services/x11/desktop-managers/surf-display.nix
··· 119 }; 120 121 config = mkIf cfg.enable { 122 - services.xserver.displayManager.sessionPackages = [ 123 pkgs.surf-display 124 ]; 125
··· 119 }; 120 121 config = mkIf cfg.enable { 122 + services.displayManager.sessionPackages = [ 123 pkgs.surf-display 124 ]; 125
+8 -211
nixos/modules/services/x11/display-managers/default.nix
··· 14 let 15 16 cfg = config.services.xserver; 17 - opt = options.services.xserver; 18 xorg = pkgs.xorg; 19 20 fontconfig = config.fonts.fontconfig; ··· 70 source ~/.xprofile 71 fi 72 73 - ${optionalString cfg.displayManager.job.logToJournal '' 74 if [ -z "$_DID_SYSTEMD_CAT" ]; then 75 export _DID_SYSTEMD_CAT=1 76 exec ${config.systemd.package}/bin/systemd-cat -t xsession "$0" "$@" 77 fi 78 ''} 79 80 - ${optionalString cfg.displayManager.job.logToFile '' 81 exec &> >(tee ~/.xsession-errors) 82 ''} 83 ··· 130 exit 1 131 fi 132 ''; 133 - 134 - installedSessions = pkgs.runCommand "desktops" 135 - { # trivial derivation 136 - preferLocalBuild = true; 137 - allowSubstitutes = false; 138 - } 139 - '' 140 - mkdir -p "$out/share/"{xsessions,wayland-sessions} 141 - 142 - ${concatMapStrings (pkg: '' 143 - for n in ${concatStringsSep " " pkg.providedSessions}; do 144 - if ! test -f ${pkg}/share/wayland-sessions/$n.desktop -o \ 145 - -f ${pkg}/share/xsessions/$n.desktop; then 146 - echo "Couldn't find provided session name, $n.desktop, in session package ${pkg.name}:" 147 - echo " ${pkg}" 148 - return 1 149 - fi 150 - done 151 - 152 - if test -d ${pkg}/share/xsessions; then 153 - ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${pkg}/share/xsessions $out/share/xsessions 154 - fi 155 - if test -d ${pkg}/share/wayland-sessions; then 156 - ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${pkg}/share/wayland-sessions $out/share/wayland-sessions 157 - fi 158 - '') cfg.displayManager.sessionPackages} 159 - ''; 160 - 161 - dmDefault = cfg.desktopManager.default; 162 - # fallback default for cases when only default wm is set 163 - dmFallbackDefault = if dmDefault != null then dmDefault else "none"; 164 - wmDefault = cfg.windowManager.default; 165 - 166 - defaultSessionFromLegacyOptions = dmFallbackDefault + optionalString (wmDefault != null && wmDefault != "none") "+${wmDefault}"; 167 - 168 in 169 170 { ··· 215 ''; 216 }; 217 218 - hiddenUsers = mkOption { 219 - type = types.listOf types.str; 220 - default = [ "nobody" ]; 221 - description = lib.mdDoc '' 222 - A list of users which will not be shown in the display manager. 223 - ''; 224 - }; 225 - 226 - sessionPackages = mkOption { 227 - type = with types; listOf (package // { 228 - description = "package with provided sessions"; 229 - check = p: assertMsg 230 - (package.check p && p ? providedSessions 231 - && p.providedSessions != [] && all isString p.providedSessions) 232 - '' 233 - Package, '${p.name}', did not specify any session names, as strings, in 234 - 'passthru.providedSessions'. This is required when used as a session package. 235 - 236 - The session names can be looked up in: 237 - ${p}/share/xsessions 238 - ${p}/share/wayland-sessions 239 - ''; 240 - }); 241 - default = []; 242 - description = lib.mdDoc '' 243 - A list of packages containing x11 or wayland session files to be passed to the display manager. 244 - ''; 245 - }; 246 - 247 session = mkOption { 248 default = []; 249 type = types.listOf types.attrs; ··· 274 ''; 275 }; 276 277 - sessionData = mkOption { 278 - description = lib.mdDoc "Data exported for display managers’ convenience"; 279 - internal = true; 280 - default = {}; 281 - apply = val: { 282 - wrapper = xsessionWrapper; 283 - desktops = installedSessions; 284 - sessionNames = concatMap (p: p.providedSessions) cfg.displayManager.sessionPackages; 285 - # We do not want to force users to set defaultSession when they have only single DE. 286 - autologinSession = 287 - if cfg.displayManager.defaultSession != null then 288 - cfg.displayManager.defaultSession 289 - else if cfg.displayManager.sessionData.sessionNames != [] then 290 - head cfg.displayManager.sessionData.sessionNames 291 - else 292 - null; 293 - }; 294 - }; 295 - 296 - defaultSession = mkOption { 297 - type = with types; nullOr str // { 298 - description = "session name"; 299 - check = d: 300 - assertMsg (d != null -> (str.check d && elem d cfg.displayManager.sessionData.sessionNames)) '' 301 - Default graphical session, '${d}', not found. 302 - Valid names for 'services.xserver.displayManager.defaultSession' are: 303 - ${concatStringsSep "\n " cfg.displayManager.sessionData.sessionNames} 304 - ''; 305 - }; 306 - default = 307 - if dmDefault != null || wmDefault != null then 308 - defaultSessionFromLegacyOptions 309 - else 310 - null; 311 - defaultText = literalMD '' 312 - Taken from display manager settings or window manager settings, if either is set. 313 - ''; 314 - example = "gnome"; 315 - description = lib.mdDoc '' 316 - Graphical session to pre-select in the session chooser (only effective for GDM, LightDM and SDDM). 317 - 318 - On GDM, LightDM and SDDM, it will also be used as a session for auto-login. 319 - ''; 320 - }; 321 - 322 importedVariables = mkOption { 323 type = types.listOf (types.strMatching "[a-zA-Z_][a-zA-Z0-9_]*"); 324 visible = false; ··· 327 ''; 328 }; 329 330 - job = { 331 - 332 - preStart = mkOption { 333 - type = types.lines; 334 - default = ""; 335 - example = "rm -f /var/log/my-display-manager.log"; 336 - description = lib.mdDoc "Script executed before the display manager is started."; 337 - }; 338 - 339 - execCmd = mkOption { 340 - type = types.str; 341 - example = literalExpression ''"''${pkgs.lightdm}/bin/lightdm"''; 342 - description = lib.mdDoc "Command to start the display manager."; 343 - }; 344 - 345 - environment = mkOption { 346 - type = types.attrsOf types.unspecified; 347 - default = {}; 348 - description = lib.mdDoc "Additional environment variables needed by the display manager."; 349 - }; 350 - 351 - logToFile = mkOption { 352 - type = types.bool; 353 - default = false; 354 - description = lib.mdDoc '' 355 - Whether the display manager redirects the output of the 356 - session script to {file}`~/.xsession-errors`. 357 - ''; 358 - }; 359 - 360 - logToJournal = mkOption { 361 - type = types.bool; 362 - default = true; 363 - description = lib.mdDoc '' 364 - Whether the display manager redirects the output of the 365 - session script to the systemd journal. 366 - ''; 367 - }; 368 - 369 - }; 370 - 371 - # Configuration for automatic login. Common for all DM. 372 - autoLogin = mkOption { 373 - type = types.submodule ({ config, options, ... }: { 374 - options = { 375 - enable = mkOption { 376 - type = types.bool; 377 - default = config.user != null; 378 - defaultText = literalExpression "config.${options.user} != null"; 379 - description = lib.mdDoc '' 380 - Automatically log in as {option}`autoLogin.user`. 381 - ''; 382 - }; 383 - 384 - user = mkOption { 385 - type = types.nullOr types.str; 386 - default = null; 387 - description = lib.mdDoc '' 388 - User to be used for the automatic login. 389 - ''; 390 - }; 391 - }; 392 - }); 393 - 394 - default = {}; 395 - description = lib.mdDoc '' 396 - Auto login configuration attrset. 397 - ''; 398 - }; 399 - 400 }; 401 402 }; 403 404 config = { 405 assertions = [ 406 - { assertion = cfg.displayManager.autoLogin.enable -> cfg.displayManager.autoLogin.user != null; 407 - message = '' 408 - services.xserver.displayManager.autoLogin.enable requires services.xserver.displayManager.autoLogin.user to be set 409 - ''; 410 - } 411 { 412 assertion = cfg.desktopManager.default != null || cfg.windowManager.default != null -> cfg.displayManager.defaultSession == defaultSessionFromLegacyOptions; 413 - message = "You cannot use both services.xserver.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default)."; 414 } 415 ]; 416 417 - warnings = 418 - mkIf (dmDefault != null || wmDefault != null) [ 419 - '' 420 - The following options are deprecated: 421 - ${concatStringsSep "\n " (map ({c, t}: t) (filter ({c, t}: c != null) [ 422 - { c = dmDefault; t = "- services.xserver.desktopManager.default"; } 423 - { c = wmDefault; t = "- services.xserver.windowManager.default"; } 424 - ]))} 425 - Please use 426 - services.xserver.displayManager.defaultSession = "${defaultSessionFromLegacyOptions}"; 427 - instead. 428 - '' 429 - ]; 430 431 services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X"; 432 ··· 449 450 # Create desktop files and scripts for starting sessions for WMs/DMs 451 # that do not have upstream session files (those defined using services.{display,desktop,window}Manager.session options). 452 - services.xserver.displayManager.sessionPackages = 453 let 454 dms = filter (s: s.manage == "desktop") cfg.displayManager.session; 455 wms = filter (s: s.manage == "window") cfg.displayManager.session; ··· 511 ) 512 (cartesianProductOfSets { dm = dms; wm = wms; }) 513 ); 514 - 515 - # Make xsessions and wayland sessions available in XDG_DATA_DIRS 516 - # as some programs have behavior that depends on them being present 517 - environment.sessionVariables.XDG_DATA_DIRS = lib.mkIf (cfg.displayManager.sessionPackages != [ ]) [ 518 - "${cfg.displayManager.sessionData.desktops}/share" 519 - ]; 520 }; 521 522 imports = [ 523 (mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ] 524 "The option is no longer necessary because all display managers have already delegated lid management to systemd.") 525 - (mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "xserver" "displayManager" "job" "logToFile" ]) 526 - (mkRenamedOptionModule [ "services" "xserver" "displayManager" "logToJournal" ] [ "services" "xserver" "displayManager" "job" "logToJournal" ]) 527 - (mkRenamedOptionModule [ "services" "xserver" "displayManager" "extraSessionFilesPackages" ] [ "services" "xserver" "displayManager" "sessionPackages" ]) 528 ]; 529 530 }
··· 14 let 15 16 cfg = config.services.xserver; 17 xorg = pkgs.xorg; 18 19 fontconfig = config.fonts.fontconfig; ··· 69 source ~/.xprofile 70 fi 71 72 + ${optionalString config.services.displayManager.logToJournal '' 73 if [ -z "$_DID_SYSTEMD_CAT" ]; then 74 export _DID_SYSTEMD_CAT=1 75 exec ${config.systemd.package}/bin/systemd-cat -t xsession "$0" "$@" 76 fi 77 ''} 78 79 + ${optionalString config.services.displayManager.logToFile '' 80 exec &> >(tee ~/.xsession-errors) 81 ''} 82 ··· 129 exit 1 130 fi 131 ''; 132 in 133 134 { ··· 179 ''; 180 }; 181 182 session = mkOption { 183 default = []; 184 type = types.listOf types.attrs; ··· 209 ''; 210 }; 211 212 importedVariables = mkOption { 213 type = types.listOf (types.strMatching "[a-zA-Z_][a-zA-Z0-9_]*"); 214 visible = false; ··· 217 ''; 218 }; 219 220 }; 221 222 }; 223 224 config = { 225 assertions = [ 226 { 227 assertion = cfg.desktopManager.default != null || cfg.windowManager.default != null -> cfg.displayManager.defaultSession == defaultSessionFromLegacyOptions; 228 + message = "You cannot use both services.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default)."; 229 } 230 ]; 231 232 + services.displayManager.sessionData.wrapper = xsessionWrapper; 233 234 services.xserver.displayManager.xserverBin = "${xorg.xorgserver.out}/bin/X"; 235 ··· 252 253 # Create desktop files and scripts for starting sessions for WMs/DMs 254 # that do not have upstream session files (those defined using services.{display,desktop,window}Manager.session options). 255 + services.displayManager.sessionPackages = 256 let 257 dms = filter (s: s.manage == "desktop") cfg.displayManager.session; 258 wms = filter (s: s.manage == "window") cfg.displayManager.session; ··· 314 ) 315 (cartesianProductOfSets { dm = dms; wm = wms; }) 316 ); 317 }; 318 319 imports = [ 320 (mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ] 321 "The option is no longer necessary because all display managers have already delegated lid management to systemd.") 322 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "job" "logsXsession" ] [ "services" "displayManager" "logToFile" ]) 323 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "logToJournal" ] [ "services" "displayManager" "logToJournal" ]) 324 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "extraSessionFilesPackages" ] [ "services" "displayManager" "sessionPackages" ]) 325 ]; 326 327 }
+9 -11
nixos/modules/services/x11/display-managers/gdm.nix
··· 32 load-module module-position-event-sounds 33 ''; 34 35 - defaultSessionName = config.services.xserver.displayManager.defaultSession; 36 37 setSessionScript = pkgs.callPackage ./account-service-util.nix { }; 38 in ··· 41 imports = [ 42 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "enable" ] [ 43 "services" 44 - "xserver" 45 "displayManager" 46 "autoLogin" 47 "enable" 48 ]) 49 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "user" ] [ 50 "services" 51 - "xserver" 52 "displayManager" 53 "autoLogin" 54 "user" ··· 148 services.xserver.display = null; 149 services.xserver.verbose = null; 150 151 - services.xserver.displayManager.job = 152 { 153 environment = { 154 GDM_X_SERVER_EXTRA_ARGS = toString 155 (filter (arg: arg != "-terminate") cfg.xserverArgs); 156 XDG_DATA_DIRS = lib.makeSearchPath "share" [ 157 gdm # for gnome-login.session 158 - cfg.sessionData.desktops 159 pkgs.gnome.gnome-control-center # for accessibility icon 160 pkgs.gnome.adwaita-icon-theme 161 pkgs.hicolor-icon-theme # empty icon theme as a base ··· 169 execCmd = "exec ${gdm}/bin/gdm"; 170 preStart = optionalString (defaultSessionName != null) '' 171 # Set default session in session chooser to a specified values – basically ignore session history. 172 - ${setSessionScript}/bin/set-session ${cfg.sessionData.autologinSession} 173 ''; 174 }; 175 ··· 265 daemon = mkMerge [ 266 { WaylandEnable = cfg.gdm.wayland; } 267 # nested if else didn't work 268 - (mkIf (cfg.autoLogin.enable && cfg.gdm.autoLogin.delay != 0 ) { 269 TimedLoginEnable = true; 270 - TimedLogin = cfg.autoLogin.user; 271 TimedLoginDelay = cfg.gdm.autoLogin.delay; 272 }) 273 - (mkIf (cfg.autoLogin.enable && cfg.gdm.autoLogin.delay == 0 ) { 274 AutomaticLoginEnable = true; 275 - AutomaticLogin = cfg.autoLogin.user; 276 }) 277 ]; 278 debug = mkIf cfg.gdm.debug { ··· 282 283 environment.etc."gdm/custom.conf".source = configFile; 284 285 - environment.etc."gdm/Xsession".source = config.services.xserver.displayManager.sessionData.wrapper; 286 287 # GDM LFS PAM modules, adapted somehow to NixOS 288 security.pam.services = {
··· 32 load-module module-position-event-sounds 33 ''; 34 35 + defaultSessionName = config.services.displayManager.defaultSession; 36 37 setSessionScript = pkgs.callPackage ./account-service-util.nix { }; 38 in ··· 41 imports = [ 42 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "enable" ] [ 43 "services" 44 "displayManager" 45 "autoLogin" 46 "enable" 47 ]) 48 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "user" ] [ 49 "services" 50 "displayManager" 51 "autoLogin" 52 "user" ··· 146 services.xserver.display = null; 147 services.xserver.verbose = null; 148 149 + services.displayManager = 150 { 151 environment = { 152 GDM_X_SERVER_EXTRA_ARGS = toString 153 (filter (arg: arg != "-terminate") cfg.xserverArgs); 154 XDG_DATA_DIRS = lib.makeSearchPath "share" [ 155 gdm # for gnome-login.session 156 + config.services.displayManager.sessionData.desktops 157 pkgs.gnome.gnome-control-center # for accessibility icon 158 pkgs.gnome.adwaita-icon-theme 159 pkgs.hicolor-icon-theme # empty icon theme as a base ··· 167 execCmd = "exec ${gdm}/bin/gdm"; 168 preStart = optionalString (defaultSessionName != null) '' 169 # Set default session in session chooser to a specified values – basically ignore session history. 170 + ${setSessionScript}/bin/set-session ${config.services.displayManager.sessionData.autologinSession} 171 ''; 172 }; 173 ··· 263 daemon = mkMerge [ 264 { WaylandEnable = cfg.gdm.wayland; } 265 # nested if else didn't work 266 + (mkIf (config.services.displayManager.autoLogin.enable && cfg.gdm.autoLogin.delay != 0 ) { 267 TimedLoginEnable = true; 268 + TimedLogin = config.services.displayManager.autoLogin.user; 269 TimedLoginDelay = cfg.gdm.autoLogin.delay; 270 }) 271 + (mkIf (config.services.displayManager.autoLogin.enable && cfg.gdm.autoLogin.delay == 0 ) { 272 AutomaticLoginEnable = true; 273 + AutomaticLogin = config.services.displayManager.autoLogin.user; 274 }) 275 ]; 276 debug = mkIf cfg.gdm.debug { ··· 280 281 environment.etc."gdm/custom.conf".source = configFile; 282 283 + environment.etc."gdm/Xsession".source = config.services.displayManager.sessionData.wrapper; 284 285 # GDM LFS PAM modules, adapted somehow to NixOS 286 security.pam.services = {
+1 -1
nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix
··· 60 61 Note that this greeter starts only the default X session. 62 You can configure the default X session using 63 - [](#opt-services.xserver.displayManager.defaultSession). 64 ''; 65 }; 66
··· 60 61 Note that this greeter starts only the default X session. 62 You can configure the default X session using 63 + [](#opt-services.displayManager.defaultSession). 64 ''; 65 }; 66
+2 -2
nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix
··· 22 23 Note that this greeter starts only the default X session. 24 You can configure the default X session using 25 - [](#opt-services.xserver.displayManager.defaultSession). 26 ''; 27 }; 28 ··· 81 { 82 assertion = dmcfg.defaultSession != null; 83 message = '' 84 - Please set: services.xserver.displayManager.defaultSession 85 ''; 86 } 87 ];
··· 22 23 Note that this greeter starts only the default X session. 24 You can configure the default X session using 25 + [](#opt-services.displayManager.defaultSession). 26 ''; 27 }; 28 ··· 81 { 82 assertion = dmcfg.defaultSession != null; 83 message = '' 84 + Please set: services.displayManager.defaultSession 85 ''; 86 } 87 ];
+9 -11
nixos/modules/services/x11/display-managers/lightdm.nix
··· 5 let 6 7 xcfg = config.services.xserver; 8 - dmcfg = xcfg.displayManager; 9 xEnv = config.systemd.services.display-manager.environment; 10 - cfg = dmcfg.lightdm; 11 sessionData = dmcfg.sessionData; 12 13 setSessionScript = pkgs.callPackage ./account-service-util.nix { }; ··· 26 else additionalArgs="-logfile /var/log/X.$display.log" 27 fi 28 29 - exec ${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} $additionalArgs "$@" 30 ''; 31 32 usersConf = writeText "users.conf" ··· 58 autologin-user-timeout = ${toString cfg.autoLogin.timeout} 59 autologin-session = ${sessionData.autologinSession} 60 ''} 61 - ${optionalString (dmcfg.setupCommands != "") '' 62 display-setup-script=${pkgs.writeScript "lightdm-display-setup" '' 63 #!${pkgs.bash}/bin/bash 64 - ${dmcfg.setupCommands} 65 ''} 66 ''} 67 ${cfg.extraSeatDefaults} ··· 86 ./lightdm-greeters/mobile.nix 87 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [ 88 "services" 89 - "xserver" 90 "displayManager" 91 "autoLogin" 92 "enable" 93 ]) 94 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] [ 95 "services" 96 - "xserver" 97 "displayManager" 98 "autoLogin" 99 "user" ··· 187 } 188 { assertion = dmcfg.autoLogin.enable -> sessionData.autologinSession != null; 189 message = '' 190 - LightDM auto-login requires that services.xserver.displayManager.defaultSession is set. 191 ''; 192 } 193 { assertion = !cfg.greeter.enable -> (dmcfg.autoLogin.enable && cfg.autoLogin.timeout == 0); ··· 203 204 # Set default session in session chooser to a specified values – basically ignore session history. 205 # Auto-login is already covered by a config value. 206 - services.xserver.displayManager.job.preStart = optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) '' 207 ${setSessionScript}/bin/set-session ${dmcfg.defaultSession} 208 ''; 209 210 # setSessionScript needs session-files in XDG_DATA_DIRS 211 - services.xserver.displayManager.job.environment.XDG_DATA_DIRS = "${dmcfg.sessionData.desktops}/share/"; 212 213 # setSessionScript wants AccountsService 214 systemd.services.display-manager.wants = [ ··· 216 ]; 217 218 # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH 219 - services.xserver.displayManager.job.execCmd = '' 220 export PATH=${lightdm}/sbin:$PATH 221 exec ${lightdm}/sbin/lightdm 222 '';
··· 5 let 6 7 xcfg = config.services.xserver; 8 + dmcfg = config.services.displayManager; 9 xEnv = config.systemd.services.display-manager.environment; 10 + cfg = xcfg.displayManager.lightdm; 11 sessionData = dmcfg.sessionData; 12 13 setSessionScript = pkgs.callPackage ./account-service-util.nix { }; ··· 26 else additionalArgs="-logfile /var/log/X.$display.log" 27 fi 28 29 + exec ${xcfg.displayManager.xserverBin} ${toString xcfg.displayManager.xserverArgs} $additionalArgs "$@" 30 ''; 31 32 usersConf = writeText "users.conf" ··· 58 autologin-user-timeout = ${toString cfg.autoLogin.timeout} 59 autologin-session = ${sessionData.autologinSession} 60 ''} 61 + ${optionalString (xcfg.displayManager.setupCommands != "") '' 62 display-setup-script=${pkgs.writeScript "lightdm-display-setup" '' 63 #!${pkgs.bash}/bin/bash 64 + ${xcfg.displayManager.setupCommands} 65 ''} 66 ''} 67 ${cfg.extraSeatDefaults} ··· 86 ./lightdm-greeters/mobile.nix 87 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [ 88 "services" 89 "displayManager" 90 "autoLogin" 91 "enable" 92 ]) 93 (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] [ 94 "services" 95 "displayManager" 96 "autoLogin" 97 "user" ··· 185 } 186 { assertion = dmcfg.autoLogin.enable -> sessionData.autologinSession != null; 187 message = '' 188 + LightDM auto-login requires that services.displayManager.defaultSession is set. 189 ''; 190 } 191 { assertion = !cfg.greeter.enable -> (dmcfg.autoLogin.enable && cfg.autoLogin.timeout == 0); ··· 201 202 # Set default session in session chooser to a specified values – basically ignore session history. 203 # Auto-login is already covered by a config value. 204 + services.displayManager.preStart = optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) '' 205 ${setSessionScript}/bin/set-session ${dmcfg.defaultSession} 206 ''; 207 208 # setSessionScript needs session-files in XDG_DATA_DIRS 209 + services.displayManager.environment.XDG_DATA_DIRS = "${dmcfg.sessionData.desktops}/share/"; 210 211 # setSessionScript wants AccountsService 212 systemd.services.display-manager.wants = [ ··· 214 ]; 215 216 # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH 217 + services.displayManager.execCmd = '' 218 export PATH=${lightdm}/sbin:$PATH 219 exec ${lightdm}/sbin/lightdm 220 '';
+36 -19
nixos/modules/services/x11/display-managers/sddm.nix nixos/modules/services/display-managers/sddm.nix
··· 2 3 let 4 xcfg = config.services.xserver; 5 - dmcfg = xcfg.displayManager; 6 - cfg = dmcfg.sddm; 7 xEnv = config.systemd.services.display-manager.environment; 8 9 sddm = cfg.package.override (old: { ··· 21 22 xserverWrapper = pkgs.writeShellScript "xserver-wrapper" '' 23 ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)} 24 - exec systemd-cat -t xserver-wrapper ${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} "$@" 25 ''; 26 27 Xsetup = pkgs.writeShellScript "Xsetup" '' 28 ${cfg.setupScript} 29 - ${dmcfg.setupCommands} 30 ''; 31 32 Xstop = pkgs.writeShellScript "Xstop" '' ··· 40 Numlock = if cfg.autoNumlock then "on" else "none"; # on, off none 41 42 # Implementation is done via pkgs/applications/display-managers/sddm/sddm-default-session.patch 43 - DefaultSession = optionalString (dmcfg.defaultSession != null) "${dmcfg.defaultSession}.desktop"; 44 45 DisplayServer = if cfg.wayland.enable then "wayland" else "x11"; 46 } // optionalAttrs (cfg.wayland.compositor == "kwin") { ··· 128 in 129 { 130 imports = [ 131 (mkRemovedOptionModule 132 - [ "services" "xserver" "displayManager" "sddm" "themes" ] 133 - "Set the option `services.xserver.displayManager.sddm.package' instead.") 134 (mkRenamedOptionModule 135 - [ "services" "xserver" "displayManager" "sddm" "autoLogin" "enable" ] 136 - [ "services" "xserver" "displayManager" "autoLogin" "enable" ]) 137 (mkRenamedOptionModule 138 - [ "services" "xserver" "displayManager" "sddm" "autoLogin" "user" ] 139 - [ "services" "xserver" "displayManager" "autoLogin" "user" ]) 140 (mkRemovedOptionModule 141 - [ "services" "xserver" "displayManager" "sddm" "extraConfig" ] 142 - "Set the option `services.xserver.displayManager.sddm.settings' instead.") 143 ]; 144 145 options = { 146 147 - services.xserver.displayManager.sddm = { 148 enable = mkOption { 149 type = types.bool; 150 default = false; ··· 268 269 assertions = [ 270 { 271 - assertion = xcfg.enable; 272 message = '' 273 - SDDM requires services.xserver.enable to be true 274 ''; 275 } 276 { 277 - assertion = dmcfg.autoLogin.enable -> autoLoginSessionName != null; 278 message = '' 279 - SDDM auto-login requires that services.xserver.displayManager.defaultSession is set. 280 ''; 281 } 282 ]; 283 284 security.pam.services = { 285 sddm.text = '' ··· 338 services = { 339 dbus.packages = [ sddm ]; 340 xserver = { 341 - displayManager.job.execCmd = "exec /run/current-system/sw/bin/sddm"; 342 # To enable user switching, allow sddm to allocate TTYs/displays dynamically. 343 tty = null; 344 display = null;
··· 2 3 let 4 xcfg = config.services.xserver; 5 + dmcfg = config.services.displayManager; 6 + cfg = config.services.displayManager.sddm; 7 xEnv = config.systemd.services.display-manager.environment; 8 9 sddm = cfg.package.override (old: { ··· 21 22 xserverWrapper = pkgs.writeShellScript "xserver-wrapper" '' 23 ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)} 24 + exec systemd-cat -t xserver-wrapper ${xcfg.displayManager.xserverBin} ${toString xcfg.displayManager.xserverArgs} "$@" 25 ''; 26 27 Xsetup = pkgs.writeShellScript "Xsetup" '' 28 ${cfg.setupScript} 29 + ${xcfg.displayManager.setupCommands} 30 ''; 31 32 Xstop = pkgs.writeShellScript "Xstop" '' ··· 40 Numlock = if cfg.autoNumlock then "on" else "none"; # on, off none 41 42 # Implementation is done via pkgs/applications/display-managers/sddm/sddm-default-session.patch 43 + DefaultSession = optionalString (config.services.displayManager.defaultSession != null) "${config.services.displayManager.defaultSession}.desktop"; 44 45 DisplayServer = if cfg.wayland.enable then "wayland" else "x11"; 46 } // optionalAttrs (cfg.wayland.compositor == "kwin") { ··· 128 in 129 { 130 imports = [ 131 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoLogin" "minimumUid" ] [ "services" "displayManager" "sddm" "autoLogin" "minimumUid" ]) 132 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoLogin" "relogin" ] [ "services" "displayManager" "sddm" "autoLogin" "relogin" ]) 133 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "autoNumlock" ] [ "services" "displayManager" "sddm" "autoNumlock" ]) 134 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "enable" ] [ "services" "displayManager" "sddm" "enable" ]) 135 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "enableHidpi" ] [ "services" "displayManager" "sddm" "enableHidpi" ]) 136 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "extraPackages" ] [ "services" "displayManager" "sddm" "extraPackages" ]) 137 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "package" ] [ "services" "displayManager" "sddm" "package" ]) 138 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "settings" ] [ "services" "displayManager" "sddm" "settings" ]) 139 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "setupScript" ] [ "services" "displayManager" "sddm" "setupScript" ]) 140 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "stopScript" ] [ "services" "displayManager" "sddm" "stopScript" ]) 141 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "theme" ] [ "services" "displayManager" "sddm" "theme" ]) 142 + (mkRenamedOptionModule [ "services" "xserver" "displayManager" "sddm" "wayland" "enable" ] [ "services" "displayManager" "sddm" "wayland" "enable" ]) 143 + 144 (mkRemovedOptionModule 145 + [ "services" "displayManager" "sddm" "themes" ] 146 + "Set the option `services.displayManager.sddm.package' instead.") 147 (mkRenamedOptionModule 148 + [ "services" "displayManager" "sddm" "autoLogin" "enable" ] 149 + [ "services" "displayManager" "autoLogin" "enable" ]) 150 (mkRenamedOptionModule 151 + [ "services" "displayManager" "sddm" "autoLogin" "user" ] 152 + [ "services" "displayManager" "autoLogin" "user" ]) 153 (mkRemovedOptionModule 154 + [ "services" "displayManager" "sddm" "extraConfig" ] 155 + "Set the option `services.displayManager.sddm.settings' instead.") 156 ]; 157 158 options = { 159 160 + services.displayManager.sddm = { 161 enable = mkOption { 162 type = types.bool; 163 default = false; ··· 281 282 assertions = [ 283 { 284 + assertion = xcfg.enable || cfg.wayland.enable; 285 message = '' 286 + SDDM requires either services.xserver.enable or services.displayManager.sddm.wayland.enable to be true 287 ''; 288 } 289 { 290 + assertion = config.services.displayManager.autoLogin.enable -> autoLoginSessionName != null; 291 message = '' 292 + SDDM auto-login requires that services.displayManager.defaultSession is set. 293 ''; 294 } 295 ]; 296 + 297 + services.displayManager = { 298 + enable = true; 299 + execCmd = "exec /run/current-system/sw/bin/sddm"; 300 + }; 301 302 security.pam.services = { 303 sddm.text = '' ··· 356 services = { 357 dbus.packages = [ sddm ]; 358 xserver = { 359 # To enable user switching, allow sddm to allocate TTYs/displays dynamically. 360 tty = null; 361 display = null;
+1 -1
nixos/modules/services/x11/display-managers/xpra.nix
··· 226 VideoRam 192000 227 ''; 228 229 - services.xserver.displayManager.job.execCmd = '' 230 ${optionalString (cfg.pulseaudio) 231 "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"} 232 exec ${pkgs.xpra}/bin/xpra ${if cfg.desktop == null then "start" else "start-desktop --start=${cfg.desktop}"} \
··· 226 VideoRam 192000 227 ''; 228 229 + services.displayManager.execCmd = '' 230 ${optionalString (cfg.pulseaudio) 231 "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"} 232 exec ${pkgs.xpra}/bin/xpra ${if cfg.desktop == null then "start" else "start-desktop --start=${cfg.desktop}"} \
+1 -1
nixos/modules/services/x11/window-managers/default.nix
··· 77 default = null; 78 example = "wmii"; 79 description = lib.mdDoc '' 80 - **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead. 81 82 Default window manager loaded if none have been chosen. 83 '';
··· 77 default = null; 78 example = "wmii"; 79 description = lib.mdDoc '' 80 + **Deprecated**, please use [](#opt-services.displayManager.defaultSession) instead. 81 82 Default window manager loaded if none have been chosen. 83 '';
+1 -1
nixos/modules/services/x11/window-managers/ragnarwm.nix
··· 18 ###### implementation 19 20 config = mkIf cfg.enable { 21 - services.xserver.displayManager.sessionPackages = [ cfg.package ]; 22 environment.systemPackages = [ cfg.package ]; 23 }; 24
··· 18 ###### implementation 19 20 config = mkIf cfg.enable { 21 + services.displayManager.sessionPackages = [ cfg.package ]; 22 environment.systemPackages = [ cfg.package ]; 23 }; 24
+5 -48
nixos/modules/services/x11/xserver.nix
··· 639 ###### implementation 640 641 config = mkIf cfg.enable { 642 643 services.xserver.displayManager.lightdm.enable = 644 let dmConf = cfg.displayManager; 645 default = !(dmConf.gdm.enable 646 - || dmConf.sddm.enable 647 || dmConf.xpra.enable 648 || dmConf.sx.enable 649 || dmConf.startx.enable 650 || config.services.greetd.enable); 651 in mkIf (default) (mkDefault true); 652 - 653 - # so that the service won't be enabled when only startx is used 654 - systemd.services.display-manager.enable = 655 - let dmConf = cfg.displayManager; 656 - noDmUsed = !(dmConf.gdm.enable 657 - || dmConf.sddm.enable 658 - || dmConf.xpra.enable 659 - || dmConf.lightdm.enable); 660 - in mkIf (noDmUsed) (mkDefault false); 661 - 662 - hardware.opengl.enable = mkDefault true; 663 664 services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ]; 665 ··· 694 # -xkbdir command line option does not seems to be passed to xkbcomp. 695 "X11/xkb".source = "${cfg.xkb.dir}"; 696 }) 697 - # localectl looks into 00-keyboard.conf 698 - //{ 699 - "X11/xorg.conf.d/00-keyboard.conf".text = '' 700 - Section "InputClass" 701 - Identifier "Keyboard catchall" 702 - MatchIsKeyboard "on" 703 - Option "XkbModel" "${cfg.xkb.model}" 704 - Option "XkbLayout" "${cfg.xkb.layout}" 705 - Option "XkbOptions" "${cfg.xkb.options}" 706 - Option "XkbVariant" "${cfg.xkb.variant}" 707 - EndSection 708 - ''; 709 - } 710 # Needed since 1.18; see https://bugs.freedesktop.org/show_bug.cgi?id=89023#c5 711 // (let cfgPath = "X11/xorg.conf.d/10-evdev.conf"; in 712 { ··· 726 xorg.xprop 727 xorg.xauth 728 pkgs.xterm 729 - pkgs.xdg-utils 730 xorg.xf86inputevdev.out # get evdev.4 man page 731 - pkgs.nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more 732 ] config.services.xserver.excludePackages 733 ++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh; 734 735 environment.pathsToLink = [ "/share/X11" ]; 736 737 - xdg = { 738 - autostart.enable = true; 739 - menus.enable = true; 740 - mime.enable = true; 741 - icons.enable = true; 742 - }; 743 - 744 - # The default max inotify watches is 8192. 745 - # Nowadays most apps require a good number of inotify watches, 746 - # the value below is used by default on several other distros. 747 - boot.kernel.sysctl."fs.inotify.max_user_instances" = mkDefault 524288; 748 - boot.kernel.sysctl."fs.inotify.max_user_watches" = mkDefault 524288; 749 - 750 - programs.gnupg.agent.pinentryPackage = lib.mkOverride 1100 pkgs.pinentry-gnome3; 751 - 752 - systemd.defaultUnit = mkIf cfg.autorun "graphical.target"; 753 - 754 systemd.services.display-manager = 755 { description = "Display Manager"; 756 ··· 761 environment = 762 optionalAttrs config.hardware.opengl.setLdLibraryPath 763 { LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; } 764 - // cfg.displayManager.job.environment; 765 766 preStart = 767 '' 768 - ${cfg.displayManager.job.preStart} 769 770 rm -f /tmp/.X0-lock 771 ''; 772 773 # TODO: move declaring the systemd service to its own mkIf 774 - script = mkIf (config.systemd.services.display-manager.enable == true) "${cfg.displayManager.job.execCmd}"; 775 776 # Stop restarting if the display manager stops (crashes) 2 times 777 # in one minute. Starting X typically takes 3-4s. ··· 910 ${cfg.extraConfig} 911 ''; 912 913 - fonts.enableDefaultPackages = mkDefault true; 914 fonts.packages = [ 915 (if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc) 916 pkgs.xorg.fontmiscmisc
··· 639 ###### implementation 640 641 config = mkIf cfg.enable { 642 + services.displayManager.enable = true; 643 644 services.xserver.displayManager.lightdm.enable = 645 let dmConf = cfg.displayManager; 646 default = !(dmConf.gdm.enable 647 + || config.services.displayManager.sddm.enable 648 || dmConf.xpra.enable 649 || dmConf.sx.enable 650 || dmConf.startx.enable 651 || config.services.greetd.enable); 652 in mkIf (default) (mkDefault true); 653 654 services.xserver.videoDrivers = mkIf (cfg.videoDriver != null) [ cfg.videoDriver ]; 655 ··· 684 # -xkbdir command line option does not seems to be passed to xkbcomp. 685 "X11/xkb".source = "${cfg.xkb.dir}"; 686 }) 687 # Needed since 1.18; see https://bugs.freedesktop.org/show_bug.cgi?id=89023#c5 688 // (let cfgPath = "X11/xorg.conf.d/10-evdev.conf"; in 689 { ··· 703 xorg.xprop 704 xorg.xauth 705 pkgs.xterm 706 xorg.xf86inputevdev.out # get evdev.4 man page 707 ] config.services.xserver.excludePackages 708 ++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh; 709 710 environment.pathsToLink = [ "/share/X11" ]; 711 712 systemd.services.display-manager = 713 { description = "Display Manager"; 714 ··· 719 environment = 720 optionalAttrs config.hardware.opengl.setLdLibraryPath 721 { LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; } 722 + // config.services.displayManager.environment; 723 724 preStart = 725 '' 726 + ${config.services.displayManager.preStart} 727 728 rm -f /tmp/.X0-lock 729 ''; 730 731 # TODO: move declaring the systemd service to its own mkIf 732 + script = mkIf (config.systemd.services.display-manager.enable == true) "${config.services.displayManager.execCmd}"; 733 734 # Stop restarting if the display manager stops (crashes) 2 times 735 # in one minute. Starting X typically takes 3-4s. ··· 868 ${cfg.extraConfig} 869 ''; 870 871 fonts.packages = [ 872 (if cfg.upscaleDefaultCursor then fontcursormisc_hidpi else pkgs.xorg.fontcursormisc) 873 pkgs.xorg.fontmiscmisc
+1 -1
nixos/modules/testing/test-instrumentation.nix
··· 216 # uses credentials to set passwords on users. 217 users.users.root.hashedPasswordFile = mkOverride 150 "${pkgs.writeText "hashed-password.root" ""}"; 218 219 - services.xserver.displayManager.job.logToJournal = true; 220 221 # Make sure we use the Guest Agent from the QEMU package for testing 222 # to reduce the closure size required for the tests.
··· 216 # uses credentials to set passwords on users. 217 users.users.root.hashedPasswordFile = mkOverride 150 "${pkgs.writeText "hashed-password.root" ""}"; 218 219 + services.displayManager.logToJournal = true; 220 221 # Make sure we use the Guest Agent from the QEMU package for testing 222 # to reduce the closure size required for the tests.
+1 -1
nixos/release.nix
··· 441 442 kde = makeClosure ({ ... }: 443 { services.xserver.enable = true; 444 - services.xserver.displayManager.sddm.enable = true; 445 services.xserver.desktopManager.plasma5.enable = true; 446 }); 447
··· 441 442 kde = makeClosure ({ ... }: 443 { services.xserver.enable = true; 444 + services.displayManager.sddm.enable = true; 445 services.xserver.desktopManager.plasma5.enable = true; 446 }); 447
+1 -1
nixos/tests/ayatana-indicators.nix
··· 21 services.xserver = { 22 enable = true; 23 desktopManager.mate.enable = true; 24 - displayManager.defaultSession = lib.mkForce "mate"; 25 }; 26 27 services.ayatana-indicators = { 28 enable = true;
··· 21 services.xserver = { 22 enable = true; 23 desktopManager.mate.enable = true; 24 }; 25 + services.displayManager.defaultSession = lib.mkForce "mate"; 26 27 services.ayatana-indicators = { 28 enable = true;
+1 -1
nixos/tests/cinnamon-wayland.nix
··· 7 imports = [ ./common/user-account.nix ]; 8 services.xserver.enable = true; 9 services.xserver.desktopManager.cinnamon.enable = true; 10 - services.xserver.displayManager = { 11 autoLogin.enable = true; 12 autoLogin.user = nodes.machine.users.users.alice.name; 13 defaultSession = "cinnamon-wayland";
··· 7 imports = [ ./common/user-account.nix ]; 8 services.xserver.enable = true; 9 services.xserver.desktopManager.cinnamon.enable = true; 10 + services.displayManager = { 11 autoLogin.enable = true; 12 autoLogin.user = nodes.machine.users.users.alice.name; 13 defaultSession = "cinnamon-wayland";
+4 -6
nixos/tests/common/auto.nix
··· 30 ###### implementation 31 32 config = lib.mkIf cfg.enable { 33 - services.xserver.displayManager = { 34 - lightdm.enable = true; 35 - autoLogin = { 36 - enable = true; 37 - user = cfg.user; 38 - }; 39 }; 40 41 # lightdm by default doesn't allow auto login for root, which is
··· 30 ###### implementation 31 32 config = lib.mkIf cfg.enable { 33 + services.xserver.displayManager.lightdm.enable = true; 34 + services.displayManager.autoLogin = { 35 + enable = true; 36 + user = cfg.user; 37 }; 38 39 # lightdm by default doesn't allow auto login for root, which is
+1 -1
nixos/tests/common/x11.nix
··· 12 13 # Use IceWM as the window manager. 14 # Don't use a desktop manager. 15 - services.xserver.displayManager.defaultSession = lib.mkDefault "none+icewm"; 16 services.xserver.windowManager.icewm.enable = true; 17 }
··· 12 13 # Use IceWM as the window manager. 14 # Don't use a desktop manager. 15 + services.displayManager.defaultSession = lib.mkDefault "none+icewm"; 16 services.xserver.windowManager.icewm.enable = true; 17 }
+6 -5
nixos/tests/gnome-flashback.nix
··· 14 services.xserver.displayManager = { 15 gdm.enable = true; 16 gdm.debug = true; 17 - autoLogin = { 18 - enable = true; 19 - user = user.name; 20 - }; 21 }; 22 23 services.xserver.desktopManager.gnome.enable = true; 24 services.xserver.desktopManager.gnome.debug = true; 25 services.xserver.desktopManager.gnome.flashback.enableMetacity = true; 26 - services.xserver.displayManager.defaultSession = "gnome-flashback-metacity"; 27 }; 28 29 testScript = { nodes, ... }: let
··· 14 services.xserver.displayManager = { 15 gdm.enable = true; 16 gdm.debug = true; 17 + }; 18 + 19 + services.displayManager.autoLogin = { 20 + enable = true; 21 + user = user.name; 22 }; 23 24 services.xserver.desktopManager.gnome.enable = true; 25 services.xserver.desktopManager.gnome.debug = true; 26 services.xserver.desktopManager.gnome.flashback.enableMetacity = true; 27 + services.displayManager.defaultSession = "gnome-flashback-metacity"; 28 }; 29 30 testScript = { nodes, ... }: let
+6 -5
nixos/tests/gnome-xorg.nix
··· 15 services.xserver.displayManager = { 16 gdm.enable = true; 17 gdm.debug = true; 18 - autoLogin = { 19 - enable = true; 20 - user = user.name; 21 - }; 22 }; 23 24 services.xserver.desktopManager.gnome.enable = true; 25 services.xserver.desktopManager.gnome.debug = true; 26 - services.xserver.displayManager.defaultSession = "gnome-xorg"; 27 28 systemd.user.services = { 29 "org.gnome.Shell@x11" = {
··· 15 services.xserver.displayManager = { 16 gdm.enable = true; 17 gdm.debug = true; 18 + }; 19 + 20 + services.displayManager.autoLogin = { 21 + enable = true; 22 + user = user.name; 23 }; 24 25 services.xserver.desktopManager.gnome.enable = true; 26 services.xserver.desktopManager.gnome.debug = true; 27 + services.displayManager.defaultSession = "gnome-xorg"; 28 29 systemd.user.services = { 30 "org.gnome.Shell@x11" = {
+5 -4
nixos/tests/gnome.nix
··· 12 services.xserver.displayManager = { 13 gdm.enable = true; 14 gdm.debug = true; 15 - autoLogin = { 16 - enable = true; 17 - user = "alice"; 18 - }; 19 }; 20 21 services.xserver.desktopManager.gnome.enable = true;
··· 12 services.xserver.displayManager = { 13 gdm.enable = true; 14 gdm.debug = true; 15 + }; 16 + 17 + services.displayManager.autoLogin = { 18 + enable = true; 19 + user = "alice"; 20 }; 21 22 services.xserver.desktopManager.gnome.enable = true;
+1 -1
nixos/tests/herbstluftwm.nix
··· 8 nodes.machine = { pkgs, lib, ... }: { 9 imports = [ ./common/x11.nix ./common/user-account.nix ]; 10 test-support.displayManager.auto.user = "alice"; 11 - services.xserver.displayManager.defaultSession = lib.mkForce "none+herbstluftwm"; 12 services.xserver.windowManager.herbstluftwm.enable = true; 13 environment.systemPackages = [ pkgs.dzen2 ]; # needed for upstream provided panel 14 };
··· 8 nodes.machine = { pkgs, lib, ... }: { 9 imports = [ ./common/x11.nix ./common/user-account.nix ]; 10 test-support.displayManager.auto.user = "alice"; 11 + services.displayManager.defaultSession = lib.mkForce "none+herbstluftwm"; 12 services.xserver.windowManager.herbstluftwm.enable = true; 13 environment.systemPackages = [ pkgs.dzen2 ]; # needed for upstream provided panel 14 };
+1 -1
nixos/tests/i3wm.nix
··· 7 nodes.machine = { lib, ... }: { 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 test-support.displayManager.auto.user = "alice"; 10 - services.xserver.displayManager.defaultSession = lib.mkForce "none+i3"; 11 services.xserver.windowManager.i3.enable = true; 12 }; 13
··· 7 nodes.machine = { lib, ... }: { 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 test-support.displayManager.auto.user = "alice"; 10 + services.displayManager.defaultSession = lib.mkForce "none+i3"; 11 services.xserver.windowManager.i3.enable = true; 12 }; 13
+1 -1
nixos/tests/lightdm.nix
··· 8 imports = [ ./common/user-account.nix ]; 9 services.xserver.enable = true; 10 services.xserver.displayManager.lightdm.enable = true; 11 - services.xserver.displayManager.defaultSession = "none+icewm"; 12 services.xserver.windowManager.icewm.enable = true; 13 }; 14
··· 8 imports = [ ./common/user-account.nix ]; 9 services.xserver.enable = true; 10 services.xserver.displayManager.lightdm.enable = true; 11 + services.displayManager.defaultSession = "none+icewm"; 12 services.xserver.windowManager.icewm.enable = true; 13 }; 14
+6 -3
nixos/tests/maestral.nix
··· 29 gui = { ... }: common { 30 services.xserver = { 31 enable = true; 32 - displayManager.sddm.enable = true; 33 - displayManager.defaultSession = "plasma"; 34 desktopManager.plasma5.enable = true; 35 desktopManager.plasma5.runUsingSystemd = true; 36 - displayManager.autoLogin = { 37 enable = true; 38 user = "alice"; 39 };
··· 29 gui = { ... }: common { 30 services.xserver = { 31 enable = true; 32 desktopManager.plasma5.enable = true; 33 desktopManager.plasma5.runUsingSystemd = true; 34 + }; 35 + 36 + services.displayManager = { 37 + sddm.enable = true; 38 + defaultSession = "plasma"; 39 + autoLogin = { 40 enable = true; 41 user = "alice"; 42 };
+1 -1
nixos/tests/mate-wayland.nix
··· 9 ]; 10 11 services.xserver.enable = true; 12 - services.xserver.displayManager = { 13 sddm.enable = true; # https://github.com/canonical/lightdm/issues/63 14 sddm.wayland.enable = true; 15 defaultSession = "MATE";
··· 9 ]; 10 11 services.xserver.enable = true; 12 + services.displayManager = { 13 sddm.enable = true; # https://github.com/canonical/lightdm/issues/63 14 sddm.wayland.enable = true; 15 defaultSession = "MATE";
+2 -4
nixos/tests/miriway.nix
··· 19 user = "alice"; 20 }; 21 22 - services.xserver = { 23 - enable = true; 24 - displayManager.defaultSession = lib.mkForce "miriway"; 25 - }; 26 27 programs.miriway = { 28 enable = true;
··· 19 user = "alice"; 20 }; 21 22 + services.xserver.enable = true; 23 + services.displayManager.defaultSession = lib.mkForce "miriway"; 24 25 programs.miriway = { 26 enable = true;
+1 -1
nixos/tests/nimdow.nix
··· 7 nodes.machine = { lib, ... }: { 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 test-support.displayManager.auto.user = "alice"; 10 - services.xserver.displayManager.defaultSession = lib.mkForce "none+nimdow"; 11 services.xserver.windowManager.nimdow.enable = true; 12 }; 13
··· 7 nodes.machine = { lib, ... }: { 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 test-support.displayManager.auto.user = "alice"; 10 + services.displayManager.defaultSession = lib.mkForce "none+nimdow"; 11 services.xserver.windowManager.nimdow.enable = true; 12 }; 13
+3 -3
nixos/tests/plasma-bigscreen.nix
··· 11 { 12 imports = [ ./common/user-account.nix ]; 13 services.xserver.enable = true; 14 - services.xserver.displayManager.sddm.enable = true; 15 - services.xserver.displayManager.defaultSession = "plasma-bigscreen-x11"; 16 services.xserver.desktopManager.plasma5.bigscreen.enable = true; 17 - services.xserver.displayManager.autoLogin = { 18 enable = true; 19 user = "alice"; 20 };
··· 11 { 12 imports = [ ./common/user-account.nix ]; 13 services.xserver.enable = true; 14 + services.displayManager.sddm.enable = true; 15 + services.displayManager.defaultSession = "plasma-bigscreen-x11"; 16 services.xserver.desktopManager.plasma5.bigscreen.enable = true; 17 + services.displayManager.autoLogin = { 18 enable = true; 19 user = "alice"; 20 };
+6 -3
nixos/tests/plasma5-systemd-start.nix
··· 12 imports = [ ./common/user-account.nix ]; 13 services.xserver = { 14 enable = true; 15 - displayManager.sddm.enable = true; 16 - displayManager.defaultSession = "plasma"; 17 desktopManager.plasma5.enable = true; 18 desktopManager.plasma5.runUsingSystemd = true; 19 - displayManager.autoLogin = { 20 enable = true; 21 user = "alice"; 22 };
··· 12 imports = [ ./common/user-account.nix ]; 13 services.xserver = { 14 enable = true; 15 desktopManager.plasma5.enable = true; 16 desktopManager.plasma5.runUsingSystemd = true; 17 + }; 18 + 19 + services.displayManager = { 20 + sddm.enable = true; 21 + defaultSession = "plasma"; 22 + autoLogin = { 23 enable = true; 24 user = "alice"; 25 };
+3 -3
nixos/tests/plasma5.nix
··· 11 { 12 imports = [ ./common/user-account.nix ]; 13 services.xserver.enable = true; 14 - services.xserver.displayManager.sddm.enable = true; 15 - services.xserver.displayManager.defaultSession = "plasma"; 16 services.xserver.desktopManager.plasma5.enable = true; 17 environment.plasma5.excludePackages = [ pkgs.plasma5Packages.elisa ]; 18 - services.xserver.displayManager.autoLogin = { 19 enable = true; 20 user = "alice"; 21 };
··· 11 { 12 imports = [ ./common/user-account.nix ]; 13 services.xserver.enable = true; 14 + services.displayManager.sddm.enable = true; 15 + services.displayManager.defaultSession = "plasma"; 16 services.xserver.desktopManager.plasma5.enable = true; 17 environment.plasma5.excludePackages = [ pkgs.plasma5Packages.elisa ]; 18 + services.displayManager.autoLogin = { 19 enable = true; 20 user = "alice"; 21 };
+4 -4
nixos/tests/plasma6.nix
··· 11 { 12 imports = [ ./common/user-account.nix ]; 13 services.xserver.enable = true; 14 - services.xserver.displayManager.sddm.enable = true; 15 # FIXME: this should be testing Wayland 16 - services.xserver.displayManager.defaultSession = "plasmax11"; 17 - services.xserver.desktopManager.plasma6.enable = true; 18 environment.plasma6.excludePackages = [ pkgs.kdePackages.elisa ]; 19 - services.xserver.displayManager.autoLogin = { 20 enable = true; 21 user = "alice"; 22 };
··· 11 { 12 imports = [ ./common/user-account.nix ]; 13 services.xserver.enable = true; 14 + services.displayManager.sddm.enable = true; 15 # FIXME: this should be testing Wayland 16 + services.displayManager.defaultSession = "plasmax11"; 17 + services.desktopManager.plasma6.enable = true; 18 environment.plasma6.excludePackages = [ pkgs.kdePackages.elisa ]; 19 + services.displayManager.autoLogin = { 20 enable = true; 21 user = "alice"; 22 };
+1 -1
nixos/tests/ragnarwm.nix
··· 8 nodes.machine = { pkgs, lib, ... }: { 9 imports = [ ./common/x11.nix ./common/user-account.nix ]; 10 test-support.displayManager.auto.user = "alice"; 11 - services.xserver.displayManager.defaultSession = lib.mkForce "ragnar"; 12 services.xserver.windowManager.ragnarwm.enable = true; 13 14 # Setup the default terminal of Ragnar
··· 8 nodes.machine = { pkgs, lib, ... }: { 9 imports = [ ./common/x11.nix ./common/user-account.nix ]; 10 test-support.displayManager.auto.user = "alice"; 11 + services.displayManager.defaultSession = lib.mkForce "ragnar"; 12 services.xserver.windowManager.ragnarwm.enable = true; 13 14 # Setup the default terminal of Ragnar
+4 -4
nixos/tests/sddm.nix
··· 15 nodes.machine = { ... }: { 16 imports = [ ./common/user-account.nix ]; 17 services.xserver.enable = true; 18 - services.xserver.displayManager.sddm.enable = true; 19 - services.xserver.displayManager.defaultSession = "none+icewm"; 20 services.xserver.windowManager.icewm.enable = true; 21 }; 22 ··· 44 nodes.machine = { ... }: { 45 imports = [ ./common/user-account.nix ]; 46 services.xserver.enable = true; 47 - services.xserver.displayManager = { 48 sddm.enable = true; 49 autoLogin = { 50 enable = true; 51 user = "alice"; 52 }; 53 }; 54 - services.xserver.displayManager.defaultSession = "none+icewm"; 55 services.xserver.windowManager.icewm.enable = true; 56 }; 57
··· 15 nodes.machine = { ... }: { 16 imports = [ ./common/user-account.nix ]; 17 services.xserver.enable = true; 18 + services.displayManager.sddm.enable = true; 19 + services.displayManager.defaultSession = "none+icewm"; 20 services.xserver.windowManager.icewm.enable = true; 21 }; 22 ··· 44 nodes.machine = { ... }: { 45 imports = [ ./common/user-account.nix ]; 46 services.xserver.enable = true; 47 + services.displayManager = { 48 sddm.enable = true; 49 autoLogin = { 50 enable = true; 51 user = "alice"; 52 }; 53 }; 54 + services.displayManager.defaultSession = "none+icewm"; 55 services.xserver.windowManager.icewm.enable = true; 56 }; 57
+1 -1
nixos/tests/wmderland.nix
··· 7 nodes.machine = { lib, ... }: { 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 test-support.displayManager.auto.user = "alice"; 10 - services.xserver.displayManager.defaultSession = lib.mkForce "none+wmderland"; 11 services.xserver.windowManager.wmderland.enable = true; 12 13 systemd.services.setupWmderlandConfig = {
··· 7 nodes.machine = { lib, ... }: { 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 test-support.displayManager.auto.user = "alice"; 10 + services.displayManager.defaultSession = lib.mkForce "none+wmderland"; 11 services.xserver.windowManager.wmderland.enable = true; 12 13 systemd.services.setupWmderlandConfig = {
+4 -6
nixos/tests/xfce.nix
··· 10 ]; 11 12 services.xserver.enable = true; 13 14 - services.xserver.displayManager = { 15 - lightdm.enable = true; 16 - autoLogin = { 17 - enable = true; 18 - user = "alice"; 19 - }; 20 }; 21 22 services.xserver.desktopManager.xfce.enable = true;
··· 10 ]; 11 12 services.xserver.enable = true; 13 + services.xserver.displayManager.lightdm.enable = true; 14 15 + services.displayManager.autoLogin = { 16 + enable = true; 17 + user = "alice"; 18 }; 19 20 services.xserver.desktopManager.xfce.enable = true;
+1 -1
nixos/tests/xmonad-xdg-autostart.nix
··· 5 nodes.machine = { pkgs, config, ... }: { 6 imports = [ ./common/x11.nix ./common/user-account.nix ]; 7 test-support.displayManager.auto.user = "alice"; 8 - services.xserver.displayManager.defaultSession = "none+xmonad"; 9 services.xserver.windowManager.xmonad.enable = true; 10 services.xserver.desktopManager.runXdgAutostartIfNone = true; 11
··· 5 nodes.machine = { pkgs, config, ... }: { 6 imports = [ ./common/x11.nix ./common/user-account.nix ]; 7 test-support.displayManager.auto.user = "alice"; 8 + services.displayManager.defaultSession = "none+xmonad"; 9 services.xserver.windowManager.xmonad.enable = true; 10 services.xserver.desktopManager.runXdgAutostartIfNone = true; 11
+1 -1
nixos/tests/xmonad.nix
··· 61 nodes.machine = { pkgs, ... }: { 62 imports = [ ./common/x11.nix ./common/user-account.nix ]; 63 test-support.displayManager.auto.user = "alice"; 64 - services.xserver.displayManager.defaultSession = "none+xmonad"; 65 services.xserver.windowManager.xmonad = { 66 enable = true; 67 enableConfiguredRecompile = true;
··· 61 nodes.machine = { pkgs, ... }: { 62 imports = [ ./common/x11.nix ./common/user-account.nix ]; 63 test-support.displayManager.auto.user = "alice"; 64 + services.displayManager.defaultSession = "none+xmonad"; 65 services.xserver.windowManager.xmonad = { 66 enable = true; 67 enableConfiguredRecompile = true;