From a5a49c350d22b6f61b82e69d0232fd8c3457bbc3 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 24 Jul 2018 12:53:31 +0200 Subject: [PATCH] network-manager-applet: use xsession.preferStatusNotifierItems --- modules/services/network-manager-applet.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/services/network-manager-applet.nix b/modules/services/network-manager-applet.nix index 6fd50575a..e91b8543e 100644 --- a/modules/services/network-manager-applet.nix +++ b/modules/services/network-manager-applet.nix @@ -2,6 +2,12 @@ with lib; +let + + cfg = config.services.network-manager-applet; + +in + { meta.maintainers = [ maintainers.rycee ]; @@ -11,7 +17,7 @@ with lib; }; }; - config = mkIf config.services.network-manager-applet.enable { + config = mkIf cfg.enable { systemd.user.services.network-manager-applet = { Unit = { Description = "Network Manager applet"; @@ -24,7 +30,12 @@ with lib; }; Service = { - ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet --sm-disable"; + ExecStart = toString ( + [ + "${pkgs.networkmanagerapplet}/bin/nm-applet" + "--sm-disable" + ] ++ optional config.xsession.preferStatusNotifierItems "--indicator" + ); }; }; };