diff --git a/modules/programs/default.nix b/modules/programs/default.nix index b539ce1d..1c335ff4 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -231,7 +231,7 @@ let # only do this for the services which are *defined* by this program though (i.e. `scvCfg ? description`) # so as to avoid idioms like when sway adds `graphical-session.partOf = default` depends = svcCfg.depends - ++ lib.optionals (svcName != "dbus" && builtins.elem "user" config.sandbox.whitelistDbus) [ + ++ lib.optionals (svcName != "dbus" && builtins.elem "user" config.sandbox.whitelistDbus && cfg.dbus.enabled) [ "dbus" ] ++ lib.optionals ((!builtins.elem "wayland" svcCfg.partOf) && config.sandbox.whitelistWayland) [ "wayland"