mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 21:33:03 +03:00
nixos/netdata: own plugins must the looked up first
Otherwise netdata will not find python modules. To make sure netdata still pick up our setuid version of apps.plugin we rename the original executable.
This commit is contained in:
parent
d417ca7ba9
commit
348b7b8be9
@ -12,7 +12,7 @@ let
|
|||||||
|
|
||||||
localConfig = {
|
localConfig = {
|
||||||
global = {
|
global = {
|
||||||
"plugins directory" = "${wrappedPlugins}/libexec/netdata/plugins.d ${pkgs.netdata}/libexec/netdata/plugins.d";
|
"plugins directory" = "${pkgs.netdata}/libexec/netdata/plugins.d ${wrappedPlugins}/libexec/netdata/plugins.d";
|
||||||
};
|
};
|
||||||
web = {
|
web = {
|
||||||
"web files owner" = "root";
|
"web files owner" = "root";
|
||||||
@ -96,7 +96,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
security.wrappers."apps.plugin" = {
|
security.wrappers."apps.plugin" = {
|
||||||
source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin";
|
source = "${pkgs.netdata}/libexec/netdata/plugins.d/apps.plugin.org";
|
||||||
capabilities = "cap_dac_read_search,cap_sys_ptrace+ep";
|
capabilities = "cap_dac_read_search,cap_sys_ptrace+ep";
|
||||||
owner = cfg.user;
|
owner = cfg.user;
|
||||||
group = cfg.group;
|
group = cfg.group;
|
||||||
|
@ -17,6 +17,12 @@ stdenv.mkDerivation rec{
|
|||||||
./no-files-in-etc-and-var.patch
|
./no-files-in-etc-and-var.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||||
|
# rename this plugin so netdata will look for setuid wrapper
|
||||||
|
mv $out/libexec/netdata/plugins.d/apps.plugin \
|
||||||
|
$out/libexec/netdata/plugins.d/apps.plugin.org
|
||||||
|
'';
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
|
Loading…
Reference in New Issue
Block a user