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 = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = lib.mkEnableOption (lib.mdDoc "nm-applet");
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|