diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-02-27 21:28:05 +0100 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-04-08 21:56:38 +0200 |
commit | 476b8c276e2ae4c98efd1d8d759029e170c5ca98 (patch) | |
tree | cc5bcb19fd25ef4cfa33e2d3feb5b950b407fa51 /nixos/modules/services/x11 | |
parent | 5598d81e949c37d5b8668182dea1a4418f209ed9 (diff) |
treewide: rename renamed sddm/displayManager settings
Diffstat (limited to 'nixos/modules/services/x11')
21 files changed, 52 insertions, 56 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/budgie.nix b/nixos/modules/services/x11/desktop-managers/budgie.nix index 466ef5c565b7..a911db725c01 100644 --- a/nixos/modules/services/x11/desktop-managers/budgie.nix +++ b/nixos/modules/services/x11/desktop-managers/budgie.nix @@ -91,7 +91,7 @@ in { }; config = mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = with pkgs; [ + services.displayManager.sessionPackages = with pkgs; [ budgie.budgie-desktop ]; diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix index f5a6c05865c4..935f173a9d81 100644 --- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix +++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix @@ -60,7 +60,7 @@ in config = mkMerge [ (mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ]; + services.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ]; services.xserver.displayManager.lightdm.greeters.slick = { enable = mkDefault true; diff --git a/nixos/modules/services/x11/desktop-managers/deepin.nix b/nixos/modules/services/x11/desktop-managers/deepin.nix index 902e3a9317dd..61f6fece5870 100644 --- a/nixos/modules/services/x11/desktop-managers/deepin.nix +++ b/nixos/modules/services/x11/desktop-managers/deepin.nix @@ -38,8 +38,8 @@ in config = mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = [ pkgs.deepin.dde-session ]; - services.xserver.displayManager.defaultSession = mkDefault "dde-x11"; + services.displayManager.sessionPackages = [ pkgs.deepin.dde-session ]; + services.displayManager.defaultSession = mkDefault "dde-x11"; # Update the DBus activation environment after launching the desktop manager. services.xserver.displayManager.sessionCommands = '' diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 33d0a7b52643..896d8dcbff40 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -87,7 +87,7 @@ in default = null; example = "none"; description = lib.mdDoc '' - **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead. + **Deprecated**, please use [](#opt-services.displayManager.defaultSession) instead. Default desktop manager loaded if none have been chosen. ''; diff --git a/nixos/modules/services/x11/desktop-managers/enlightenment.nix b/nixos/modules/services/x11/desktop-managers/enlightenment.nix index 28dd408c923c..d241c63436fa 100644 --- a/nixos/modules/services/x11/desktop-managers/enlightenment.nix +++ b/nixos/modules/services/x11/desktop-managers/enlightenment.nix @@ -54,7 +54,7 @@ in "/share/locale" ]; - services.xserver.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ]; + services.displayManager.sessionPackages = [ pkgs.enlightenment.enlightenment ]; services.xserver.displayManager.sessionCommands = '' if test "$XDG_CURRENT_DESKTOP" = "Enlightenment"; then diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix index 2cf9bc2eac37..cc959bcf7bd5 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -261,7 +261,7 @@ in services.gnome.core-shell.enable = true; services.gnome.core-utilities.enable = mkDefault true; - services.xserver.displayManager.sessionPackages = [ pkgs.gnome.gnome-session.sessions ]; + services.displayManager.sessionPackages = [ pkgs.gnome.gnome-session.sessions ]; environment.extraInit = '' ${concatMapStrings (p: '' @@ -285,7 +285,7 @@ in }) (mkIf flashbackEnabled { - services.xserver.displayManager.sessionPackages = + services.displayManager.sessionPackages = let wmNames = map (wm: wm.wmName) flashbackWms; namesAreUnique = lib.unique wmNames == wmNames; diff --git a/nixos/modules/services/x11/desktop-managers/lumina.nix b/nixos/modules/services/x11/desktop-managers/lumina.nix index 7b694106bf7e..9df9fe42a1ff 100644 --- a/nixos/modules/services/x11/desktop-managers/lumina.nix +++ b/nixos/modules/services/x11/desktop-managers/lumina.nix @@ -27,7 +27,7 @@ in config = mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = [ + services.displayManager.sessionPackages = [ pkgs.lumina.lumina ]; diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix index 957eac7848e7..e475442b9ef4 100644 --- a/nixos/modules/services/x11/desktop-managers/mate.nix +++ b/nixos/modules/services/x11/desktop-managers/mate.nix @@ -49,7 +49,7 @@ in config = mkMerge [ (mkIf (cfg.enable || cfg.enableWaylandSession) { - services.xserver.displayManager.sessionPackages = [ + services.displayManager.sessionPackages = [ pkgs.mate.mate-session-manager ]; @@ -103,7 +103,7 @@ in environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${pkgs.mate.mate-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; environment.systemPackages = [ pkgs.mate.mate-wayland-session ]; - services.xserver.displayManager.sessionPackages = [ pkgs.mate.mate-wayland-session ]; + services.displayManager.sessionPackages = [ pkgs.mate.mate-wayland-session ]; }) ]; } diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix index b9ca6bd4ba8d..695d81f666a1 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.nix +++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix @@ -96,7 +96,7 @@ in pkgs.pantheon.pantheon-agent-geoclue2 ] config.environment.pantheon.excludePackages; - services.xserver.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ]; + services.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ]; # Ensure lightdm is used when Pantheon is enabled # Without it screen locking will be nonfunctional because of the use of lightlocker @@ -109,7 +109,7 @@ in # Without this, elementary LightDM greeter will pre-select non-existent `default` session # https://github.com/elementary/greeter/issues/368 - services.xserver.displayManager.defaultSession = mkDefault "pantheon"; + services.displayManager.defaultSession = mkDefault "pantheon"; services.xserver.displayManager.sessionCommands = '' if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then diff --git a/nixos/modules/services/x11/desktop-managers/phosh.nix b/nixos/modules/services/x11/desktop-managers/phosh.nix index 75e02130addc..41107788db0a 100644 --- a/nixos/modules/services/x11/desktop-managers/phosh.nix +++ b/nixos/modules/services/x11/desktop-managers/phosh.nix @@ -220,7 +220,7 @@ in services.gnome.core-shell.enable = true; services.gnome.core-os-services.enable = true; - services.xserver.displayManager.sessionPackages = [ cfg.package ]; + services.displayManager.sessionPackages = [ cfg.package ]; environment.etc."phosh/phoc.ini".source = if builtins.isPath cfg.phocConfig then cfg.phocConfig diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index f516a29fb5db..bb6e5873deff 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -357,7 +357,7 @@ in pkgs.media-player-info ]; - services.xserver.displayManager.sddm = { + services.displayManager.sddm = { theme = mkDefault "breeze"; }; @@ -403,16 +403,16 @@ in system.nixos-generate-config.desktopConfiguration = [ '' # Enable the Plasma 5 Desktop Environment. - services.xserver.displayManager.sddm.enable = true; + services.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma5.enable = true; '' ]; - services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-workspace ]; + services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-workspace ]; # Default to be `plasma` (X11) instead of `plasmawayland`, since plasma wayland currently has # many tiny bugs. # See: https://github.com/NixOS/nixpkgs/issues/143272 - services.xserver.displayManager.defaultSession = mkDefault "plasma"; + services.displayManager.defaultSession = mkDefault "plasma"; environment.systemPackages = with pkgs.plasma5Packages; @@ -538,7 +538,7 @@ in }; }; - services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-mobile ]; + services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-mobile ]; }) # Plasma Bigscreen @@ -559,7 +559,7 @@ in kdeconnect-kde ]; - services.xserver.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-bigscreen ]; + services.displayManager.sessionPackages = [ pkgs.plasma5Packages.plasma-bigscreen ]; # required for plasma-remotecontrollers to work correctly hardware.uinput.enable = true; diff --git a/nixos/modules/services/x11/desktop-managers/surf-display.nix b/nixos/modules/services/x11/desktop-managers/surf-display.nix index 38ebb9d02b4a..e5f2c76f4ac2 100644 --- a/nixos/modules/services/x11/desktop-managers/surf-display.nix +++ b/nixos/modules/services/x11/desktop-managers/surf-display.nix @@ -119,7 +119,7 @@ in { }; config = mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = [ + services.displayManager.sessionPackages = [ pkgs.surf-display ]; diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 5e2d1bf39abf..129bafefabe9 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -69,14 +69,14 @@ let source ~/.xprofile fi - ${optionalString cfg.displayManager.job.logToJournal '' + ${optionalString config.services.displayManager.logToJournal '' if [ -z "$_DID_SYSTEMD_CAT" ]; then export _DID_SYSTEMD_CAT=1 exec ${config.systemd.package}/bin/systemd-cat -t xsession "$0" "$@" fi ''} - ${optionalString cfg.displayManager.job.logToFile '' + ${optionalString config.services.displayManager.logToFile '' exec &> >(tee ~/.xsession-errors) ''} @@ -225,7 +225,7 @@ in assertions = [ { assertion = cfg.desktopManager.default != null || cfg.windowManager.default != null -> cfg.displayManager.defaultSession == defaultSessionFromLegacyOptions; - message = "You cannot use both services.xserver.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default)."; + message = "You cannot use both services.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default)."; } ]; diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 400e5601dc59..6bdfe9ea6f8c 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -32,7 +32,7 @@ let load-module module-position-event-sounds ''; - defaultSessionName = config.services.xserver.displayManager.defaultSession; + defaultSessionName = config.services.displayManager.defaultSession; setSessionScript = pkgs.callPackage ./account-service-util.nix { }; in @@ -41,14 +41,12 @@ in imports = [ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "enable" ] [ "services" - "xserver" "displayManager" "autoLogin" "enable" ]) (mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "user" ] [ "services" - "xserver" "displayManager" "autoLogin" "user" @@ -148,14 +146,14 @@ in services.xserver.display = null; services.xserver.verbose = null; - services.xserver.displayManager.job = + services.displayManager = { environment = { GDM_X_SERVER_EXTRA_ARGS = toString (filter (arg: arg != "-terminate") cfg.xserverArgs); XDG_DATA_DIRS = lib.makeSearchPath "share" [ gdm # for gnome-login.session - cfg.sessionData.desktops + config.services.displayManager.sessionData.desktops pkgs.gnome.gnome-control-center # for accessibility icon pkgs.gnome.adwaita-icon-theme pkgs.hicolor-icon-theme # empty icon theme as a base @@ -169,7 +167,7 @@ in execCmd = "exec ${gdm}/bin/gdm"; preStart = optionalString (defaultSessionName != null) '' # Set default session in session chooser to a specified values – basically ignore session history. - ${setSessionScript}/bin/set-session ${cfg.sessionData.autologinSession} + ${setSessionScript}/bin/set-session ${config.services.displayManager.sessionData.autologinSession} ''; }; @@ -265,14 +263,14 @@ in daemon = mkMerge [ { WaylandEnable = cfg.gdm.wayland; } # nested if else didn't work - (mkIf (cfg.autoLogin.enable && cfg.gdm.autoLogin.delay != 0 ) { + (mkIf (config.services.displayManager.autoLogin.enable && cfg.gdm.autoLogin.delay != 0 ) { TimedLoginEnable = true; - TimedLogin = cfg.autoLogin.user; + TimedLogin = config.services.displayManager.autoLogin.user; TimedLoginDelay = cfg.gdm.autoLogin.delay; }) - (mkIf (cfg.autoLogin.enable && cfg.gdm.autoLogin.delay == 0 ) { + (mkIf (config.services.displayManager.autoLogin.enable && cfg.gdm.autoLogin.delay == 0 ) { AutomaticLoginEnable = true; - AutomaticLogin = cfg.autoLogin.user; + AutomaticLogin = config.services.displayManager.autoLogin.user; }) ]; debug = mkIf cfg.gdm.debug { @@ -282,7 +280,7 @@ in environment.etc."gdm/custom.conf".source = configFile; - environment.etc."gdm/Xsession".source = config.services.xserver.displayManager.sessionData.wrapper; + environment.etc."gdm/Xsession".source = config.services.displayManager.sessionData.wrapper; # GDM LFS PAM modules, adapted somehow to NixOS security.pam.services = { diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix index f4195c4c2dc3..8702d0b97ed2 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix @@ -60,7 +60,7 @@ in Note that this greeter starts only the default X session. You can configure the default X session using - [](#opt-services.xserver.displayManager.defaultSession). + [](#opt-services.displayManager.defaultSession). ''; }; diff --git a/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix b/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix index dede7680ecb3..b2ea8e6d94f2 100644 --- a/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix +++ b/nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix @@ -22,7 +22,7 @@ in Note that this greeter starts only the default X session. You can configure the default X session using - [](#opt-services.xserver.displayManager.defaultSession). + [](#opt-services.displayManager.defaultSession). ''; }; @@ -81,7 +81,7 @@ in { assertion = dmcfg.defaultSession != null; message = '' - Please set: services.xserver.displayManager.defaultSession + Please set: services.displayManager.defaultSession ''; } ]; diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix index 548d3c5bc46a..cb6365bace35 100644 --- a/nixos/modules/services/x11/display-managers/lightdm.nix +++ b/nixos/modules/services/x11/display-managers/lightdm.nix @@ -5,9 +5,9 @@ with lib; let xcfg = config.services.xserver; - dmcfg = xcfg.displayManager; + dmcfg = config.services.displayManager; xEnv = config.systemd.services.display-manager.environment; - cfg = dmcfg.lightdm; + cfg = xcfg.displayManager.lightdm; sessionData = dmcfg.sessionData; setSessionScript = pkgs.callPackage ./account-service-util.nix { }; @@ -26,7 +26,7 @@ let else additionalArgs="-logfile /var/log/X.$display.log" fi - exec ${dmcfg.xserverBin} ${toString dmcfg.xserverArgs} $additionalArgs "$@" + exec ${xcfg.displayManager.xserverBin} ${toString xcfg.displayManager.xserverArgs} $additionalArgs "$@" ''; usersConf = writeText "users.conf" @@ -58,10 +58,10 @@ let autologin-user-timeout = ${toString cfg.autoLogin.timeout} autologin-session = ${sessionData.autologinSession} ''} - ${optionalString (dmcfg.setupCommands != "") '' + ${optionalString (xcfg.displayManager.setupCommands != "") '' display-setup-script=${pkgs.writeScript "lightdm-display-setup" '' #!${pkgs.bash}/bin/bash - ${dmcfg.setupCommands} + ${xcfg.displayManager.setupCommands} ''} ''} ${cfg.extraSeatDefaults} @@ -86,14 +86,12 @@ in ./lightdm-greeters/mobile.nix (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [ "services" - "xserver" "displayManager" "autoLogin" "enable" ]) (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] [ "services" - "xserver" "displayManager" "autoLogin" "user" @@ -187,7 +185,7 @@ in } { assertion = dmcfg.autoLogin.enable -> sessionData.autologinSession != null; message = '' - LightDM auto-login requires that services.xserver.displayManager.defaultSession is set. + LightDM auto-login requires that services.displayManager.defaultSession is set. ''; } { assertion = !cfg.greeter.enable -> (dmcfg.autoLogin.enable && cfg.autoLogin.timeout == 0); @@ -203,12 +201,12 @@ in # Set default session in session chooser to a specified values – basically ignore session history. # Auto-login is already covered by a config value. - services.xserver.displayManager.job.preStart = optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) '' + services.displayManager.preStart = optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) '' ${setSessionScript}/bin/set-session ${dmcfg.defaultSession} ''; # setSessionScript needs session-files in XDG_DATA_DIRS - services.xserver.displayManager.job.environment.XDG_DATA_DIRS = "${dmcfg.sessionData.desktops}/share/"; + services.displayManager.environment.XDG_DATA_DIRS = "${dmcfg.sessionData.desktops}/share/"; # setSessionScript wants AccountsService systemd.services.display-manager.wants = [ @@ -216,7 +214,7 @@ in ]; # lightdm relaunches itself via just `lightdm`, so needs to be on the PATH - services.xserver.displayManager.job.execCmd = '' + services.displayManager.execCmd = '' export PATH=${lightdm}/sbin:$PATH exec ${lightdm}/sbin/lightdm ''; diff --git a/nixos/modules/services/x11/display-managers/xpra.nix b/nixos/modules/services/x11/display-managers/xpra.nix index 3e7c6b01b3e9..ce80e013e81e 100644 --- a/nixos/modules/services/x11/display-managers/xpra.nix +++ b/nixos/modules/services/x11/display-managers/xpra.nix @@ -226,7 +226,7 @@ in VideoRam 192000 ''; - services.xserver.displayManager.job.execCmd = '' + services.displayManager.execCmd = '' ${optionalString (cfg.pulseaudio) "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"} exec ${pkgs.xpra}/bin/xpra ${if cfg.desktop == null then "start" else "start-desktop --start=${cfg.desktop}"} \ diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index e180f2693e0c..527c95bb14ac 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -77,7 +77,7 @@ in default = null; example = "wmii"; description = lib.mdDoc '' - **Deprecated**, please use [](#opt-services.xserver.displayManager.defaultSession) instead. + **Deprecated**, please use [](#opt-services.displayManager.defaultSession) instead. Default window manager loaded if none have been chosen. ''; diff --git a/nixos/modules/services/x11/window-managers/ragnarwm.nix b/nixos/modules/services/x11/window-managers/ragnarwm.nix index 7242c8b1324c..0f4c2660b1e0 100644 --- a/nixos/modules/services/x11/window-managers/ragnarwm.nix +++ b/nixos/modules/services/x11/window-managers/ragnarwm.nix @@ -18,7 +18,7 @@ in ###### implementation config = mkIf cfg.enable { - services.xserver.displayManager.sessionPackages = [ cfg.package ]; + services.displayManager.sessionPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ]; }; diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index f7ca08678e70..b9d39aa2b2ef 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -644,7 +644,7 @@ in services.xserver.displayManager.lightdm.enable = let dmConf = cfg.displayManager; default = !(dmConf.gdm.enable - || dmConf.sddm.enable + || config.services.displayManager.sddm.enable || dmConf.xpra.enable || dmConf.sx.enable || dmConf.startx.enable @@ -719,17 +719,17 @@ in environment = optionalAttrs config.hardware.opengl.setLdLibraryPath { LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.addOpenGLRunpath.driverLink ]; } - // cfg.displayManager.job.environment; + // config.services.displayManager.environment; preStart = '' - ${cfg.displayManager.job.preStart} + ${config.services.displayManager.preStart} rm -f /tmp/.X0-lock ''; # TODO: move declaring the systemd service to its own mkIf - script = mkIf (config.systemd.services.display-manager.enable == true) "${cfg.displayManager.job.execCmd}"; + script = mkIf (config.systemd.services.display-manager.enable == true) "${config.services.displayManager.execCmd}"; # Stop restarting if the display manager stops (crashes) 2 times # in one minute. Starting X typically takes 3-4s. |