2018-09-07 17:52:54 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.wavemon;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
programs.wavemon = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2024-04-13 12:54:15 +00:00
|
|
|
description = ''
|
2018-09-07 17:52:54 +00:00
|
|
|
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 = {
|
2021-09-12 16:53:48 +00:00
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
2018-09-07 17:52:54 +00:00
|
|
|
capabilities = "cap_net_admin+ep";
|
2021-09-12 16:53:48 +00:00
|
|
|
source = "${pkgs.wavemon}/bin/wavemon";
|
2018-09-07 17:52:54 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|