nixos-config/nixos/system/server/netdata.nix
Ingolf Wagner 4a01d917e3
update
2022-11-04 20:45:09 +01:00

26 lines
690 B
Nix

{ lib, pkgs, ... }: {
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
'';
}