nixos/iftop: improve description, use lib.getExe

This commit is contained in:
Sandro Jäckel 2024-11-18 16:28:30 +01:00
parent eb42ef0c24
commit 4fae28967b
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -4,7 +4,7 @@ let
cfg = config.programs.iftop;
in {
options = {
programs.iftop.enable = lib.mkEnableOption "iftop + setcap wrapper";
programs.iftop.enable = lib.mkEnableOption "iftop and setcap wrapper for it";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.iftop ];
@ -12,7 +12,7 @@ in {
owner = "root";
group = "root";
capabilities = "cap_net_raw+p";
source = "${pkgs.iftop}/bin/iftop";
source = lib.getExe pkgs.iftop;
};
};
}