summaryrefslogtreecommitdiff
path: root/os/srv/ntopng.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-06-17 00:28:00 +0200
committeradikro <adikro@disroot.org>2026-06-17 00:28:00 +0200
commit630da5d0639cada53e26a03f579df0a7bac3b17a (patch)
tree73edd6ea30331d807413d548f9559d89acc38a82 /os/srv/ntopng.nix
parentce7fb7ddd3267291a8d692cc6381dad606288aa5 (diff)
librewolf manual compilation issue
Diffstat (limited to 'os/srv/ntopng.nix')
-rw-r--r--os/srv/ntopng.nix35
1 files changed, 29 insertions, 6 deletions
diff --git a/os/srv/ntopng.nix b/os/srv/ntopng.nix
index 3c11534..692fe2c 100644
--- a/os/srv/ntopng.nix
+++ b/os/srv/ntopng.nix
@@ -1,20 +1,43 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ masterDomain,
+ securityTemplates,
+ ...
+}:
let
cfg = config.os.srv.ntopng;
in
{
- options.os.srv.ntopng.enable = lib.mkEnableOption "enables ntopng monitoring";
+ options.os.srv.ntopng = {
+ enable = lib.mkEnableOption "enables ntopng monitoring";
+ proxyConfig = lib.mkOption {
+ type = lib.types.attrs;
+ default = { };
+ };
+ };
config = lib.mkIf cfg.enable {
services.ntopng = {
enable = true;
- httpPort = 3000;
- extraConfig = "--packet-fanout";
+ extraConfig = "--packet-fanout 'cluster' -g 2 -m '192.168.0.0/16,10.0.0.0/8' -X 50000 --community";
# TODO fill interfaces
interfaces = [
- ""
- ""
+ "" # WAN Interface
+ "" # LAN Interface
+ "" # Virtual Bridge
];
};
+ os.srv.ntopng.proxyConfig = {
+ "ntopng.${masterDomain}" = {
+ enableACME = true;
+ forceSSL = true;
+
+ locations."/" = {
+ proxyPass = "http://${config.os.core.network.ips.vm2-gateway}:3000";
+ extraConfig = securityTemplates.restrictToInternal;
+ };
+ };
+ };
};
}