2020-04-24 23:36:52 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
meta = {
|
|
|
|
maintainers = lib.teams.freedesktop.members;
|
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
options.programs.nm-applet = {
|
|
|
|
enable = lib.mkEnableOption "nm-applet";
|
|
|
|
|
|
|
|
indicator = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
default = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2020-09-25 04:45:31 +00:00
|
|
|
Whether to use indicator instead of status icon.
|
|
|
|
It is needed for Appindicator environments, like Enlightenment.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
config = lib.mkIf config.programs.nm-applet.enable {
|
|
|
|
systemd.user.services.nm-applet = {
|
|
|
|
description = "Network manager applet";
|
|
|
|
wantedBy = [ "graphical-session.target" ];
|
|
|
|
partOf = [ "graphical-session.target" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet ${lib.optionalString config.programs.nm-applet.indicator "--indicator"}";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
services.dbus.packages = [ pkgs.gcr ];
|
|
|
|
};
|
|
|
|
}
|