From fa38155eec9563dc9dc620a77900d87b97443cfe Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 18:57:16 +0200 Subject: ma: move systems to subdir, init source --- makefu/1systems/shoney/config.nix | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 makefu/1systems/shoney/config.nix (limited to 'makefu/1systems/shoney') diff --git a/makefu/1systems/shoney/config.nix b/makefu/1systems/shoney/config.nix new file mode 100644 index 00000000..9f04e97e --- /dev/null +++ b/makefu/1systems/shoney/config.nix @@ -0,0 +1,63 @@ +{ config, pkgs, ... }: +let + tinc-siem-ip = "10.8.10.1"; + + ip = "64.137.234.215"; + alt-ip = "64.137.234.210"; # honeydrive honeyd + extra-ip1 = "64.137.234.114"; # floating tinc.siem + extra-ip2 = "64.137.234.232"; # honeydrive + gw = "64.137.234.1"; +in { + imports = [ + ../. + ../2configs/save-diskspace.nix + ../2configs/hw/CAC.nix + ../2configs/fs/CAC-CentOS-7-64bit.nix + ../2configs/tinc/retiolum.nix + ../2configs/torrent.nix + ]; + + + krebs = { + enable = true; + build.host = config.krebs.hosts.shoney; + tinc_graphs = { + enable = true; + network = "siem"; + hostsPath = "/etc/tinc/siem/hosts"; + nginx = { + enable = true; + # TODO: remove hard-coded hostname + anonymous-domain = "localhost.localdomain"; + anonymous.extraConfig = "return 403;"; + complete = { + serverAliases = [ "graph.siem" ]; + extraConfig = '' + if ( $server_addr = "${ip}" ) { + return 403; + } + ''; + }; + }; + }; + }; + makefu.forward-journal = { + enable = true; + src = "10.8.10.1"; + dst = "10.8.10.6"; + }; + networking = { + interfaces.enp2s1.ip4 = [ + { address = ip; prefixLength = 24; } + # { address = alt-ip; prefixLength = 24; } + ]; + + defaultGateway = gw; + nameservers = [ "8.8.8.8" ]; + firewall = { + trustedInterfaces = [ "tinc.siem" ]; + allowedUDPPorts = [ 655 1655 ]; + allowedTCPPorts = [ 655 1655 ]; + }; + }; +} -- cgit v1.2.3 From 7704f80890c75f65c2906ecc17cdd89761d308ad Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 15 Jul 2017 19:01:02 +0200 Subject: ma: replace path to 2configs, init source.nix --- makefu/1systems/shoney/config.nix | 12 ++++++------ makefu/1systems/shoney/source.nix | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 makefu/1systems/shoney/source.nix (limited to 'makefu/1systems/shoney') diff --git a/makefu/1systems/shoney/config.nix b/makefu/1systems/shoney/config.nix index 9f04e97e..6cec260d 100644 --- a/makefu/1systems/shoney/config.nix +++ b/makefu/1systems/shoney/config.nix @@ -9,12 +9,12 @@ let gw = "64.137.234.1"; in { imports = [ - ../. - ../2configs/save-diskspace.nix - ../2configs/hw/CAC.nix - ../2configs/fs/CAC-CentOS-7-64bit.nix - ../2configs/tinc/retiolum.nix - ../2configs/torrent.nix + + + + + + ]; diff --git a/makefu/1systems/shoney/source.nix b/makefu/1systems/shoney/source.nix new file mode 100644 index 00000000..382474f5 --- /dev/null +++ b/makefu/1systems/shoney/source.nix @@ -0,0 +1,3 @@ +import { + name="shoney"; +} -- cgit v1.2.3