@@ -0,0 +1,43 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.programs.nm-applet;
7+in
8+
9+{
10+
11+ ###### interface
12+
13+ options = {
14+
15+ programs.nm-applet = {
16+
17+ enable = mkOption {
18+ type = types.bool;
19+ default = false;
20+ description = ''
21+ Whether to enable nm-applet.
22+ '';
23+ };
24+
25+ };
26+
27+ };
28+
29+
30+ ###### implementation
31+
32+ config = mkIf cfg.enable {
33+
34+ systemd.user.services.nm-applet = {
35+ description = "Network manager applet";
36+ wantedBy = [ "graphical-session.target" ];
37+ partOf = [ "graphical-session.target" ];
38+ serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet";
39+ };
40+
41+ };
42+
43+}