From 570b82015e696f505fba1878d94dfda8cb2b40be Mon Sep 17 00:00:00 2001 From: chn Date: Wed, 18 Oct 2023 20:57:58 +0800 Subject: [PATCH] system.gui: disable plasma-nm when gui is not preferred --- modules/system/gui.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/system/gui.nix b/modules/system/gui.nix index 024e9cc2..fff5c87a 100644 --- a/modules/system/gui.nix +++ b/modules/system/gui.nix @@ -19,7 +19,11 @@ inputs: videoDrivers = inputs.config.nixos.hardware.gpus; }; systemd.services.display-manager.after = [ "network-online.target" ]; - environment.sessionVariables."GTK_USE_PORTAL" = "1"; + environment = + { + sessionVariables."GTK_USE_PORTAL" = "1"; + plasma5.excludePackages = inputs.lib.mkIf (!gui.preferred) [ inputs.pkgs.plasma5Packages.plasma-nm ]; + }; xdg.portal.extraPortals = map (p: inputs.pkgs."xdg-desktop-portal-${p}") [ "gtk" "kde" "wlr" ]; i18n.inputMethod = {