nixos/netdata: fix permissions for slabinfo.plugin
This commit is contained in:
parent
50281a823f
commit
a3c769fef6
|
@ -9,6 +9,7 @@ let
|
||||||
mkdir -p $out/libexec/netdata/plugins.d
|
mkdir -p $out/libexec/netdata/plugins.d
|
||||||
ln -s /run/wrappers/bin/apps.plugin $out/libexec/netdata/plugins.d/apps.plugin
|
ln -s /run/wrappers/bin/apps.plugin $out/libexec/netdata/plugins.d/apps.plugin
|
||||||
ln -s /run/wrappers/bin/freeipmi.plugin $out/libexec/netdata/plugins.d/freeipmi.plugin
|
ln -s /run/wrappers/bin/freeipmi.plugin $out/libexec/netdata/plugins.d/freeipmi.plugin
|
||||||
|
ln -s /run/wrappers/bin/slabinfo.plugin $out/libexec/netdata/plugins.d/slabinfo.plugin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
|
@ -181,6 +182,14 @@ in {
|
||||||
permissions = "u+rx,g+rx,o-rwx";
|
permissions = "u+rx,g+rx,o-rwx";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.wrappers."slabinfo.plugin" = {
|
||||||
|
source = "${cfg.package}/libexec/netdata/plugins.d/slabinfo.plugin.org";
|
||||||
|
capabilities = "cap_dac_override+ep";
|
||||||
|
owner = cfg.user;
|
||||||
|
group = cfg.group;
|
||||||
|
permissions = "u+rx,g+rx,o-rx";
|
||||||
|
};
|
||||||
|
|
||||||
security.pam.loginLimits = [
|
security.pam.loginLimits = [
|
||||||
{ domain = "netdata"; type = "soft"; item = "nofile"; value = "10000"; }
|
{ domain = "netdata"; type = "soft"; item = "nofile"; value = "10000"; }
|
||||||
{ domain = "netdata"; type = "hard"; item = "nofile"; value = "30000"; }
|
{ domain = "netdata"; type = "hard"; item = "nofile"; value = "30000"; }
|
||||||
|
|
|
@ -52,13 +52,15 @@ in stdenv.mkDerivation rec {
|
||||||
# rename this plugin so netdata will look for setuid wrapper
|
# rename this plugin so netdata will look for setuid wrapper
|
||||||
mv $out/libexec/netdata/plugins.d/apps.plugin \
|
mv $out/libexec/netdata/plugins.d/apps.plugin \
|
||||||
$out/libexec/netdata/plugins.d/apps.plugin.org
|
$out/libexec/netdata/plugins.d/apps.plugin.org
|
||||||
|
mv $out/libexec/netdata/plugins.d/slabinfo.plugin \
|
||||||
|
$out/libexec/netdata/plugins.d/slabinfo.plugin.org
|
||||||
${optionalString withIpmi ''
|
${optionalString withIpmi ''
|
||||||
mv $out/libexec/netdata/plugins.d/freeipmi.plugin \
|
mv $out/libexec/netdata/plugins.d/freeipmi.plugin \
|
||||||
$out/libexec/netdata/plugins.d/freeipmi.plugin.org
|
$out/libexec/netdata/plugins.d/freeipmi.plugin.org
|
||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preConfigure = optionalString (!stdenv.isDarwin) ''
|
preConfigure = optionalString (!stdenv.isDarwin) ''
|
||||||
substituteInPlace collectors/python.d.plugin/python_modules/third_party/lm_sensors.py \
|
substituteInPlace collectors/python.d.plugin/python_modules/third_party/lm_sensors.py \
|
||||||
--replace 'ctypes.util.find_library("sensors")' '"${lm_sensors.out}/lib/libsensors${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
--replace 'ctypes.util.find_library("sensors")' '"${lm_sensors.out}/lib/libsensors${stdenv.hostPlatform.extensions.sharedLibrary}"'
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue