nixpkgs/nixos/modules/programs/nm-applet.nix

44 lines
659 B
Nix
Raw Normal View History

2018-12-02 11:18:47 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.programs.nm-applet;
in
{
###### interface
options = {
programs.nm-applet = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable nm-applet.
'';
};
};
};
###### implementation
config = mkIf cfg.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";
};
};
}