nixos/netdata: introduce recommendedPythonPackages
This option furthers the "zero configuration" reputation of netdata by collecting some Python packages available in nixpkgs and offering them to the module. It is disabled by default. Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
@@ -89,6 +89,14 @@ in {
|
||||
Whether to enable python-based plugins
|
||||
'';
|
||||
};
|
||||
recommendedPythonPackages = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Whether to enable a set of recommended Python plugins
|
||||
by installing extra Python packages.
|
||||
'';
|
||||
};
|
||||
extraPackages = mkOption {
|
||||
type = types.functionTo (types.listOf types.package);
|
||||
default = ps: [];
|
||||
@@ -201,6 +209,17 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
# Includes a set of recommended Python plugins in exchange of imperfect disk consumption.
|
||||
services.netdata.python.extraPackages = lib.mkIf cfg.python.recommendedPythonPackages (ps: [
|
||||
ps.requests
|
||||
ps.pandas
|
||||
ps.numpy
|
||||
ps.psycopg2
|
||||
ps.python-ldap
|
||||
ps.netdata-pandas
|
||||
ps.changefinder
|
||||
]);
|
||||
|
||||
services.netdata.configDir.".opt-out-from-anonymous-statistics" = mkIf (!cfg.enableAnalyticsReporting) (pkgs.writeText ".opt-out-from-anonymous-statistics" "");
|
||||
environment.etc."netdata/netdata.conf".source = configFile;
|
||||
environment.etc."netdata/conf.d".source = configDirectory;
|
||||
|
||||
Reference in New Issue
Block a user