nixos-config/nixos/components/monitor/netdata.nix

34 lines
835 B
Nix
Raw Normal View History

2023-12-29 17:03:35 +01:00
{ lib, pkgs, config, ... }:
with lib;
with types;
{
config = lib.mkIf config.components.monitor.enable {
services.netdata = {
enable = lib.mkDefault true;
# https://docs.netdata.cloud/daemon/config/
config = {
global = {
"memory mode" = "ram";
};
};
#configDir."python.d.conf" = pkgs.writeText "python.d.conf" ''
# example: yes
# default_run: no
# samba: yes
#'';
};
# add samba to path of python plugin
#systemd.services.netdata.path = [ pkgs.sudo pkgs.samba ];
#systemd.services.netdata.serviceConfig.CapabilityBoundingSet = [ "~" ];
#security.sudo.extraConfig = ''
# netdata ALL=(root) NOPASSWD: ${pkgs.samba}/bin/smbstatus
# netdata ALL=(root) NOPASSWD: /run/current-system/sw/bin/smbstatus
#'';
};
}