44 lines
784 B
Nix
44 lines
784 B
Nix
{
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
sops-nix,
|
|
...
|
|
}:
|
|
with lib;
|
|
let
|
|
p = config.sops.placeholder;
|
|
domain = p.domainName;
|
|
version = "v0.1.0";
|
|
in
|
|
{
|
|
virtualisation.oci-containers.containers.netflow2ng = {
|
|
autoStart = true;
|
|
image = "docker.io/synfinatic/netflow2ng:${version}";
|
|
# entrypoint = "/netflow2ng --tlv --metrics=0.0.0.0:8081";
|
|
entrypoint = "/main.sh";
|
|
# network_mode = "host";
|
|
ports = [
|
|
"2555:2555"
|
|
"127.0.0.1:5556:5556"
|
|
"127.0.0.1:8081:8080"
|
|
];
|
|
volumes = [
|
|
"/root/main.sh:/main.sh:ro"
|
|
];
|
|
extraOptions = [
|
|
"--network=host"
|
|
];
|
|
};
|
|
|
|
services.ntopng = {
|
|
enable = true;
|
|
interfaces = [ "tcp://127.0.0.1:5556" ];
|
|
httpPort = 8174;
|
|
};
|
|
|
|
networking.firewall.allowedUDPPorts = [
|
|
2055
|
|
];
|
|
}
|