mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
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:
parent
0794ea59cd
commit
3386a3aab0
1 changed files with 19 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue