made zabbix use vars.nix
This commit is contained in:
parent
efad9dfc75
commit
94be939295
3 changed files with 14 additions and 19 deletions
|
|
@ -6,8 +6,9 @@
|
|||
|
||||
podman = {
|
||||
extraOptions = [
|
||||
"--dns=100.100.100.100"
|
||||
"-l=io.containers.autoupdate=registry"
|
||||
"--dns=100.100.100.100"
|
||||
"--dns-search=mc-fucker.vpn.mc-fucker.cool"
|
||||
];
|
||||
hostIP = "10.88.0.1";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ in
|
|||
|
||||
services.zabbixAgent = {
|
||||
enable = true;
|
||||
server = "mc4";
|
||||
server = "mc4,10.88.1.0";
|
||||
#package = pkgs.zabbix.agent2;
|
||||
package = (pkgs.callPackages ../packages/zabbix/agent2.nix {}).${version};
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
db = "zabbix";
|
||||
db_host = "10.88.0.1";
|
||||
version = "latest";
|
||||
port = "8999";
|
||||
domain = "zbx.mc-fucker.cool";
|
||||
podman_dns = "--dns=100.100.100.100";
|
||||
cfg = import ./vars.nix;
|
||||
db = cfg.zabbix.db;
|
||||
db_host = cfg.podman.hostIP;
|
||||
port = cfg.zabbix.port;
|
||||
domain = cfg.zabbix.domain;
|
||||
server_ip = "10.88.1.0";
|
||||
web_ip = "10.88.1.1";
|
||||
in
|
||||
|
|
@ -30,31 +29,26 @@ in
|
|||
};
|
||||
|
||||
virtualisation.oci-containers.containers.zabbix-server = {
|
||||
image = "zabbix/zabbix-server-pgsql:alpine-6.2-latest";
|
||||
image = "docker.io/zabbix/zabbix-server-pgsql:alpine-6.2-latest";
|
||||
environment = {
|
||||
DB_SERVER_HOST = db_host;
|
||||
POSTGRES_USER = db;
|
||||
};
|
||||
environmentFiles = [ /etc/nixos/keys/zabbix-env ];
|
||||
extraOptions = [
|
||||
podman_dns
|
||||
"--ip=${server_ip}"
|
||||
];
|
||||
extraOptions = cfg.podman.extraOptions ++ [ "--ip=${server_ip}" ];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.zabbix-web = {
|
||||
image = "zabbix/zabbix-web-nginx-pgsql:alpine-6.2-latest";
|
||||
image = "docker.io/zabbix/zabbix-web-nginx-pgsql:alpine-6.2-latest";
|
||||
environment = {
|
||||
DB_SERVER_HOST = db_host;
|
||||
POSTGRES_USER = db;
|
||||
ZBX_SERVER_HOST = server_ip;
|
||||
ZBX_SERVER_NAME = "Superbly Managed Networks and Hosting";
|
||||
PHP_TZ = "Europe/Berlin";
|
||||
};
|
||||
environmentFiles = [ /etc/nixos/keys/zabbix-env ];
|
||||
extraOptions = [
|
||||
podman_dns
|
||||
"--ip=${web_ip}"
|
||||
];
|
||||
extraOptions = cfg.podman.extraOptions ++ [ "--ip=${web_ip}" ];
|
||||
ports = [ "${port}:8080" ];
|
||||
};
|
||||
|
||||
|
|
@ -70,7 +64,7 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
networking.firewall.interfaces.podman0.allowedTCPPorts = [ 5432 ];
|
||||
networking.firewall.interfaces.podman0.allowedTCPPorts = [ 5432 10050 ];
|
||||
}
|
||||
|
||||
# vim: set et ts=2 sw=2 ai:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue