diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2018-12-02 11:34:26 +0000 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-12-02 11:38:47 +0000 |
commit | b3662053b3b05160dcb5759e583c9aedb85722ec (patch) | |
tree | f6a16f10142fceca497dcb441ccf1eaab64e0183 /nixos/modules/programs/nm-applet.nix | |
parent | 95cbb71abecf50a2c616b1ab60f866f427cc1fd7 (diff) |
nixos/nm-applet: make the module smaller
more readable imho
Diffstat (limited to 'nixos/modules/programs/nm-applet.nix')
-rw-r--r-- | nixos/modules/programs/nm-applet.nix | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/nixos/modules/programs/nm-applet.nix b/nixos/modules/programs/nm-applet.nix index 311a75deb198..e42219e9638c 100644 --- a/nixos/modules/programs/nm-applet.nix +++ b/nixos/modules/programs/nm-applet.nix @@ -1,43 +1,14 @@ { config, lib, pkgs, ... }: -with lib; - -let - cfg = config.programs.nm-applet; -in - { + options.programs.nm-applet.enable = lib.mkEnableOption "nm-applet"; - ###### interface - - options = { - - programs.nm-applet = { - - enable = mkOption { - type = types.bool; - default = false; - description = '' - Whether to enable nm-applet. - ''; - }; - - }; - - }; - - - ###### implementation - - config = mkIf cfg.enable { - + 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"; }; - }; - } |