nixpkgs/nixos/modules/programs/bandwhich.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
750 B
Nix
Raw Normal View History

2019-12-30 12:58:58 +01:00
{ config, lib, pkgs, ... }:
let cfg = config.programs.bandwhich;
2019-12-30 12:58:58 +01:00
in {
meta.maintainers = with lib.maintainers; [ Br1ght0ne ];
2019-12-30 12:58:58 +01:00
options = {
programs.bandwhich = {
enable = lib.mkOption {
type = lib.types.bool;
2019-12-30 12:58:58 +01:00
default = false;
description = ''
Whether to add bandwhich to the global environment and configure a
2019-12-30 12:58:58 +01:00
setcap wrapper for it.
'';
};
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ bandwhich ];
security.wrappers.bandwhich = {
owner = "root";
group = "root";
capabilities = "cap_sys_ptrace,cap_dac_read_search,cap_net_raw,cap_net_admin+ep";
source = "${pkgs.bandwhich}/bin/bandwhich";
2019-12-30 12:58:58 +01:00
};
};
}