-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
nixos/iotop: add module #51749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/iotop: add module #51749
Conversation
The `iotop` program can't be started by an unprivileged user because of missing root privileges. The issue can be fixed by creating a setcap wrapper for `iotop` which contains `cap_net_admin`.
ff8fe5f
to
7490e96
Compare
as this is a fairly trivial module, I'd do the merge tomorrow unless there are any folks against it. |
programs.iotop.enable = mkEnableOption "iotop + setcap wrapper"; | ||
}; | ||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ pkgs.iotop ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/run/wrappers/bin
is on $PATH
already, so I don't think this is needed (or even does anything, as the iotop in $PATH
will override this one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, guess I was a couple minutes late :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! Fixed in 6a0d2ff
The binary will be in `/run/wrappers/bin` and adding `pkgs.iotop` won't have any effect. See also NixOS#51749 (comment)
Motivation for this change
The
iotop
program can't be started by an unprivileged user because ofmissing root privileges. The issue can be fixed by creating a
setcap wrapper for
iotop
which containscap_net_admin
.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)