hmm
This commit is contained in:
@@ -95,6 +95,17 @@ let
|
||||
host = "any";
|
||||
}
|
||||
] "Nebula outbound firewall rules";
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Stats / metrics HTTP endpoint
|
||||
# -----------------------------------------------------------------------
|
||||
stats = {
|
||||
enable = lib.${namespace}.mkBoolOpt false "Enable the Nebula HTTP stats endpoint";
|
||||
|
||||
listenAddress = lib.${namespace}.mkOpt types.str "127.0.0.1" "Address the stats endpoint binds to";
|
||||
|
||||
statsPort = lib.${namespace}.mkOpt types.port 8474 "Port the stats endpoint listens on";
|
||||
};
|
||||
};
|
||||
moduleConfig = {
|
||||
environment.systemPackages = with pkgs; [ nebula ];
|
||||
@@ -136,6 +147,12 @@ let
|
||||
inbound = cfg.inboundRules;
|
||||
outbound = cfg.outboundRules;
|
||||
};
|
||||
|
||||
settings.stats = lib.mkIf cfg.stats.enable {
|
||||
type = "json";
|
||||
listen = "${cfg.stats.listenAddress}:${toString cfg.stats.statsPort}";
|
||||
interval = "10s";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user