mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/iotop: make package overridable
This commit is contained in:
parent
a78a226cec
commit
b35b54bf07
1 changed files with 5 additions and 2 deletions
|
@ -10,14 +10,17 @@ let
|
|||
in
|
||||
{
|
||||
options = {
|
||||
programs.iotop.enable = lib.mkEnableOption "iotop + setcap wrapper";
|
||||
programs.iotop = {
|
||||
enable = lib.mkEnableOption "iotop + setcap wrapper";
|
||||
package = lib.mkPackageOption pkgs "iotop" { example = "iotop-c"; };
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
security.wrappers.iotop = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_net_admin+p";
|
||||
source = "${pkgs.iotop}/bin/iotop";
|
||||
source = lib.getExe cfg.package;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue