mirror of
https://github.com/nix-community/home-manager
synced 2024-12-28 12:49:48 +01:00
484a1c9442
The `--sm-disable` flag is deprecated. It doesn't show in the man pages, any documentation, and others have seemed to notice as well: > The `--sm-disable` flag isn't used anymore due to the applet no longer being session-managed. From: <https://askubuntu.com/a/525273> Which cites: <https://mail.gnome.org/archives/networkmanager-list/2011-May/msg00141.html> PR #4296
40 lines
1,003 B
Nix
40 lines
1,003 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.network-manager-applet;
|
|
|
|
in {
|
|
meta.maintainers = [ maintainers.rycee hm.maintainers.cvoges12 ];
|
|
|
|
options = {
|
|
services.network-manager-applet = {
|
|
enable = mkEnableOption "the Network Manager applet";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
assertions = [
|
|
(lib.hm.assertions.assertPlatform "services.network-manager-applet" pkgs
|
|
lib.platforms.linux)
|
|
];
|
|
|
|
systemd.user.services.network-manager-applet = {
|
|
Unit = {
|
|
Description = "Network Manager applet";
|
|
Requires = [ "tray.target" ];
|
|
After = [ "graphical-session-pre.target" "tray.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
Service = {
|
|
ExecStart = toString ([ "${pkgs.networkmanagerapplet}/bin/nm-applet" ]
|
|
++ optional config.xsession.preferStatusNotifierItems "--indicator");
|
|
};
|
|
};
|
|
};
|
|
}
|