move netdata to monitoring component
This commit is contained in:
parent
650559abe6
commit
12f2bf4bf8
11 changed files with 60 additions and 36 deletions
|
@ -4,6 +4,7 @@
|
|||
./gui
|
||||
./mainUser.nix
|
||||
./media
|
||||
./monitor
|
||||
./network
|
||||
./nixos
|
||||
./terminal
|
||||
|
|
20
nixos/components/monitor/default.nix
Normal file
20
nixos/components/monitor/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, ... }:
|
||||
with lib;
|
||||
with types;
|
||||
{
|
||||
|
||||
|
||||
options.components.monitor = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./netdata.nix
|
||||
];
|
||||
|
||||
|
||||
config = mkIf config.components.monitor.enable { };
|
||||
}
|
33
nixos/components/monitor/netdata.nix
Normal file
33
nixos/components/monitor/netdata.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ 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
|
||||
#'';
|
||||
|
||||
|
||||
};
|
||||
}
|
|
@ -20,10 +20,6 @@
|
|||
enable = true;
|
||||
path = "/home/palo/.password-store";
|
||||
};
|
||||
#private = {
|
||||
# enable = true;
|
||||
# path = "/home/palo/private";
|
||||
#};
|
||||
art = {
|
||||
enable = true;
|
||||
path = "/home/palo/art";
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# last system packages that need to be migrated to components
|
||||
../../system/all/borg-jobs.nix
|
||||
#../../system/all/syncthing.nix
|
||||
../../system/server/netdata.nix
|
||||
#../../system/server/netdata.nix
|
||||
../../modules
|
||||
|
||||
../../components
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
../../system/all/borg-jobs.nix
|
||||
../../system/all/defaults.nix
|
||||
#../../system/all/syncthing.nix
|
||||
../../system/server/netdata.nix
|
||||
#../../system/server/netdata.nix
|
||||
../../system/server/packages.nix
|
||||
|
||||
../../components
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
../../system/all/borg-jobs.nix
|
||||
../../system/all/defaults.nix
|
||||
#../../system/all/syncthing.nix
|
||||
../../system/server/netdata.nix
|
||||
#../../system/server/netdata.nix
|
||||
../../system/server/packages.nix
|
||||
|
||||
../../components
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
../../components
|
||||
../../system/desktop
|
||||
../../system/server/netdata.nix
|
||||
#../../system/server/netdata.nix
|
||||
|
||||
./hardware-configuration.nix
|
||||
./packages.nix
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
imports = [
|
||||
../../system/all
|
||||
../../system/server/netdata.nix
|
||||
#../../system/server/netdata.nix
|
||||
../../system/server/graylog-exporter.nix
|
||||
../../system/server/prometheus-exporters.nix
|
||||
];
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
imports = [
|
||||
../../system/all
|
||||
./netdata.nix
|
||||
#./netdata.nix
|
||||
./initssh.nix
|
||||
#./graylog-exporter.nix
|
||||
./prometheus-exporters.nix
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{ 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
|
||||
#'';
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue