nixos/programs/sessiond: make it explicitly enabled

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

View File

@ -70,6 +70,8 @@ let
in
{
options.programs.sessiond = {
enable = lib.mkEnableOption "creating X11-based desktop sessions with sessiond";
package = lib.mkOption {
type = lib.types.package;
default = pkgs.sessiond;
@ -183,7 +185,7 @@ in
};
};
config = lib.mkIf (cfg.sessions != { }) {
config = lib.mkIf (cfg.enable && cfg.sessions != { }) {
environment.systemPackages = [ cfg.package ];
# Install all of the desktop session files.