network-manager-applet: use xsession.preferStatusNotifierItems

This commit is contained in:
Robert Helgesson 2018-07-24 12:53:31 +02:00
parent 6ae2d74fca
commit a5a49c350d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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"
);
};
};
};