mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
hosts/ni/services/monitoring: init
This commit is contained in:
parent
8618d3145e
commit
3e33e2b796
@ -18,6 +18,7 @@
|
||||
hardware.qol.enable = true;
|
||||
networking.enable = true;
|
||||
services.backup.enable = true;
|
||||
services.monitoring.enable = true;
|
||||
setups = {
|
||||
desktop.enable = true;
|
||||
development.enable = true;
|
||||
|
@ -5,6 +5,7 @@
|
||||
./networking/setup.nix
|
||||
./networking/wireguard.nix
|
||||
./services/backup
|
||||
./services/monitoring.nix
|
||||
./services/download-media
|
||||
./setups/desktop.nix
|
||||
./setups/development.nix
|
||||
|
35
configs/nixos/ni/modules/services/monitoring.nix
Normal file
35
configs/nixos/ni/modules/services/monitoring.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hostCfg = config.hosts.ni;
|
||||
cfg = hostCfg.services.monitoring;
|
||||
in
|
||||
{
|
||||
options.hosts.ni.services.monitoring.enable =
|
||||
lib.mkEnableOption "enable local desktop monitoring service";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
state.ports.grafana.value = 24532;
|
||||
|
||||
services.grafana.enable = true;
|
||||
|
||||
services.grafana.declarativePlugins = with pkgs.grafanaPlugins; [
|
||||
grafana-piechart-panel
|
||||
];
|
||||
|
||||
services.grafana.settings = {
|
||||
database.type = "sqlite3";
|
||||
server = {
|
||||
http_address = "localhost";
|
||||
http_port = config.state.ports.grafana.value;
|
||||
};
|
||||
|
||||
# It's a local instance for a local use so there's not much to
|
||||
# worry about.
|
||||
security = {
|
||||
admin_password = "admin";
|
||||
admin_user = "admin";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user