Merge pull request #98004 from romildo/upd.nm-applet

nixos/nm-applet: starts the applet with Appindicator support
This commit is contained in:
WORLDofPEACE 2020-09-14 20:44:51 -04:00 committed by GitHub
commit d23f814eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -5,14 +5,25 @@
maintainers = lib.teams.freedesktop.members;
};
options.programs.nm-applet.enable = lib.mkEnableOption "nm-applet";
options.programs.nm-applet = {
enable = lib.mkEnableOption "nm-applet";
indicator = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to use indicator instead of status icon.
It is needed for Appindicator environments, like Enlightenment.
'';
};
};
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" ];
serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet";
serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet ${lib.optionalString config.programs.nm-applet.indicator "--indicator"}";
};
services.dbus.packages = [ pkgs.gcr ];

View file

@ -240,6 +240,8 @@ in
# Otherwise you can't store NetworkManager Secrets with
# "Store the password only for this user"
programs.nm-applet.enable = true;
# Pantheon has its own network indicator
programs.nm-applet.indicator = false;
# Shell integration for VTE terminals
programs.bash.vteIntegration = mkDefault true;