nixos/programs/gnome-session: make it explicitly enabled

This commit is contained in:
Gabriel Arazas 2024-03-06 16:30:30 +08:00
parent 01fd15fc8a
commit f3462beed8
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -144,6 +144,8 @@ let
in in
{ {
options.programs.gnome-session = { options.programs.gnome-session = {
enable = lib.mkEnableOption "creating desktop sessions with gnome-session";
package = lib.mkOption { package = lib.mkOption {
type = lib.types.package; type = lib.types.package;
default = pkgs.gnome.gnome-session; default = pkgs.gnome.gnome-session;
@ -295,7 +297,7 @@ in
}; };
}; };
config = lib.mkIf (cfg.sessions != { }) { config = lib.mkIf (cfg.enable && cfg.sessions != { }) {
# Install all of the desktop session files. # Install all of the desktop session files.
services.xserver.displayManager.sessionPackages = sessionPackages; services.xserver.displayManager.sessionPackages = sessionPackages;
environment.systemPackages = [ cfg.package ] ++ sessionPackages; environment.systemPackages = [ cfg.package ] ++ sessionPackages;