@@ -1,43 +1,14 @@
11{ config, lib, pkgs, ... }:
22
3−with lib;
4−
5−let
6− cfg = config.programs.nm-applet;
7−in
8−
93{
4+ options.programs.nm-applet.enable = lib.mkEnableOption "nm-applet";
105
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−
6+ config = lib.mkIf config.programs.nm-applet.enable {
347 systemd.user.services.nm-applet = {
358 description = "Network manager applet";
369 wantedBy = [ "graphical-session.target" ];
3710 partOf = [ "graphical-session.target" ];
3811 serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet";
3912 };
40−
4113 };
42−
4314}