added stuff
This commit is contained in:
parent
937f28770d
commit
236b8c2a6b
907 changed files with 70990 additions and 0 deletions
26
nyx/modules/options/system/services/monitoring.nix
Normal file
26
nyx/modules/options/system/services/monitoring.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption;
|
||||
|
||||
sys = config.modules.system;
|
||||
cfg = sys.services;
|
||||
|
||||
# mkEnableOption is the same as mkEnableOption but with the default value being equal to cfg.monitoring.enable
|
||||
mkEnableOption' = desc: mkEnableOption "${desc}" // {default = cfg.monitoring.enable;};
|
||||
in {
|
||||
options.modules.system.services = {
|
||||
# monitoring tools
|
||||
# TODO: how do I mkModule those? they feature multiple host-specific parts
|
||||
# that need to be adressed
|
||||
monitoring = {
|
||||
enable = mkEnableOption "system monitoring stack";
|
||||
prometheus.enable = mkEnableOption' "Prometheus monitoring service";
|
||||
grafana.enable = mkEnableOption' "Grafana monitoring service";
|
||||
loki.enable = mkEnableOption' "Loki monitoring service";
|
||||
uptime-kuma.enable = mkEnableOption' "Uptime Kuma monitoring service";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue