add(system): btop.nix
gives more permission to btop (specifically for reading CPU power)
This commit is contained in:
@@ -0,0 +1,15 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
# Install btop system-wide with ROCm support for GPU monitoring.
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.btop.override { rocmSupport = true; })
|
||||||
|
];
|
||||||
|
|
||||||
|
# Create a security wrapper for btop to grant it capabilities
|
||||||
|
# to read CPU power information without running as root.
|
||||||
|
security.wrappers."btop-power" = {
|
||||||
|
source = "${pkgs.btop.override { rocmSupport = true; }}/bin/btop";
|
||||||
|
owner = "root";
|
||||||
|
group = "root";
|
||||||
|
capabilities = "cap_dac_read_search,cap_sys_ptrace+ep";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user