diff options
author | geistesk <github.jyf300hj@0x21.biz> | 2018-09-07 19:52:54 +0200 |
---|---|---|
committer | geistesk <github.jyf300hj@0x21.biz> | 2018-09-07 20:35:17 +0200 |
commit | 7469e68ddaf9efa67467586574996f9e00c138a3 (patch) | |
tree | d8b99dc494d775724b26d3e92cd23becd6c27048 /nixos/modules/programs/wavemon.nix | |
parent | 2729373cd1924b3e8ece946e5435efc760002113 (diff) |
nixos/wavemon: create module
Diffstat (limited to 'nixos/modules/programs/wavemon.nix')
-rw-r--r-- | nixos/modules/programs/wavemon.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/modules/programs/wavemon.nix b/nixos/modules/programs/wavemon.nix new file mode 100644 index 000000000000..ac665fe4a023 --- /dev/null +++ b/nixos/modules/programs/wavemon.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.programs.wavemon; +in { + options = { + programs.wavemon = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to add wavemon to the global environment and configure a + setcap wrapper for it. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ wavemon ]; + security.wrappers.wavemon = { + source = "${pkgs.wavemon}/bin/wavemon"; + capabilities = "cap_net_admin+ep"; + }; + }; +} |