nixos-config/nixos/system/server/netdata.nix

27 lines
690 B
Nix
Raw Normal View History

2019-12-20 05:54:26 +01:00
{ lib, pkgs, ... }: {
2019-10-24 02:20:38 +02:00
services.netdata = {
2019-12-14 06:15:37 +01:00
enable = lib.mkDefault true;
2019-10-24 02:20:38 +02:00
# https://docs.netdata.cloud/daemon/config/
config = {
global = {
"memory mode" = "ram";
};
};
2022-11-04 20:45:09 +01:00
configDir."python.d.conf" = pkgs.writeText "python.d.conf" ''
example: yes
default_run: no
samba: yes
'';
2019-10-24 02:20:38 +02:00
};
2022-11-04 20:45:09 +01:00
# 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
'';
2019-10-24 02:20:38 +02:00
}