Merge remote-tracking branch 'pnp/master'
This commit is contained in:
commit
5f67567d85
@ -129,12 +129,9 @@ with import ../../4lib { inherit lib; };
|
|||||||
euer IN MX 1 aspmx.l.google.com.
|
euer IN MX 1 aspmx.l.google.com.
|
||||||
io IN NS pigstarter.krebsco.de.
|
io IN NS pigstarter.krebsco.de.
|
||||||
pigstarter IN A ${head nets.internet.addrs4}
|
pigstarter IN A ${head nets.internet.addrs4}
|
||||||
conf IN A ${head nets.internet.addrs4}
|
|
||||||
gold IN A ${head nets.internet.addrs4}
|
gold IN A ${head nets.internet.addrs4}
|
||||||
graph IN A ${head nets.internet.addrs4}
|
|
||||||
tinc IN A ${head nets.internet.addrs4}
|
tinc IN A ${head nets.internet.addrs4}
|
||||||
boot IN A ${head nets.internet.addrs4}
|
boot IN A ${head nets.internet.addrs4}'';
|
||||||
mx42 IN A ${head nets.internet.addrs4}'';
|
|
||||||
};
|
};
|
||||||
nets = {
|
nets = {
|
||||||
internet = {
|
internet = {
|
||||||
|
@ -11,19 +11,24 @@ with import ../../4lib { inherit lib; };
|
|||||||
cores = 2;
|
cores = 2;
|
||||||
dc = "tv"; #dc = "cac";
|
dc = "tv"; #dc = "cac";
|
||||||
extraZones = {
|
extraZones = {
|
||||||
|
# TODO generate krebsco.de zone from nets and don't use extraZones at all
|
||||||
"krebsco.de" = ''
|
"krebsco.de" = ''
|
||||||
mx23 IN A ${elemAt nets.internet.addrs4 0}
|
krebsco.de. 60 IN MX 5 mx23
|
||||||
cd IN A ${elemAt nets.internet.addrs4 0}
|
mx23 60 IN A ${elemAt nets.internet.addrs4 0}
|
||||||
krebsco.de. IN MX 5 mx23'';
|
cd 60 IN A ${elemAt nets.internet.addrs4 0}
|
||||||
|
cgit 60 IN A ${elemAt nets.internet.addrs4 0}
|
||||||
|
cgit.cd 60 IN A ${elemAt nets.internet.addrs4 0}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
nets = rec {
|
nets = rec {
|
||||||
internet = {
|
internet = {
|
||||||
addrs4 = ["162.219.7.216"];
|
addrs4 = ["162.219.7.216"];
|
||||||
aliases = [
|
aliases = [
|
||||||
"cd.internet"
|
"cd.internet"
|
||||||
|
"cd.krebsco.de"
|
||||||
|
"cgit.cd.krebsco.de"
|
||||||
"cd.viljetic.de"
|
"cd.viljetic.de"
|
||||||
"cgit.cd.viljetic.de"
|
"cgit.cd.viljetic.de"
|
||||||
"cd.krebsco.de"
|
|
||||||
];
|
];
|
||||||
ssh.port = 11423;
|
ssh.port = 11423;
|
||||||
};
|
};
|
||||||
@ -88,10 +93,20 @@ with import ../../4lib { inherit lib; };
|
|||||||
ssh.privkey.path = <secrets/ssh.id_ed25519>;
|
ssh.privkey.path = <secrets/ssh.id_ed25519>;
|
||||||
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICuShEqU0Cdm7KCaMD5x1D6mgj+cr7qoqbzFJDKoBbbw";
|
ssh.pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICuShEqU0Cdm7KCaMD5x1D6mgj+cr7qoqbzFJDKoBbbw";
|
||||||
};
|
};
|
||||||
ire = {
|
ire = rec {
|
||||||
|
extraZones = {
|
||||||
|
# TODO generate krebsco.de zone from nets and don't use extraZones at all
|
||||||
|
"krebsco.de" = ''
|
||||||
|
ire 60 IN A ${elemAt nets.internet.addrs4 0}
|
||||||
|
'';
|
||||||
|
};
|
||||||
nets = {
|
nets = {
|
||||||
internet = {
|
internet = {
|
||||||
addrs4 = ["198.147.22.115"];
|
addrs4 = ["198.147.22.115"];
|
||||||
|
aliases = [
|
||||||
|
"ire.internet"
|
||||||
|
"ire.krebsco.de"
|
||||||
|
];
|
||||||
ssh.port = 11423;
|
ssh.port = 11423;
|
||||||
};
|
};
|
||||||
retiolum = {
|
retiolum = {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
name = "krebszones-${version}";
|
name = "krebszones-${version}";
|
||||||
version = "0.4.3";
|
version = "0.4.4";
|
||||||
propagatedBuildInputs = with pkgs.python3Packages;[
|
propagatedBuildInputs = with pkgs.python3Packages;[
|
||||||
d2to1 # for setup to work
|
d2to1 # for setup to work
|
||||||
ovh
|
ovh
|
||||||
@ -10,7 +10,7 @@ python3Packages.buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz";
|
url = "https://pypi.python.org/packages/source/k/krebszones/krebszones-${version}.tar.gz";
|
||||||
sha256 = "1i6aqy27bikypc4mq7ymfnvf42rr5sxiy6l7gnyk6ifhlp1jq8z5";
|
sha256 = "1bzfc2b9468769j1yj93j12zdlccqbjiqfhql2larximh491sg4d";
|
||||||
};
|
};
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://krebsco.de/;
|
homepage = http://krebsco.de/;
|
||||||
|
@ -83,7 +83,9 @@ let
|
|||||||
|
|
||||||
ExecStartPre = pkgs.writeScript "tinc_graphs-init" ''
|
ExecStartPre = pkgs.writeScript "tinc_graphs-init" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mkdir -p "${external_dir}" "${internal_dir}"
|
if ! test -e "${cfg.workingDir}/internal/index.html"; then
|
||||||
|
cp -fr "$(${pkgs.tinc_graphs}/bin/tincstats-static-dir)/internal/" "${internal_dir}"
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ExecStart = "${pkgs.tinc_graphs}/bin/all-the-graphs";
|
ExecStart = "${pkgs.tinc_graphs}/bin/all-the-graphs";
|
||||||
@ -94,10 +96,10 @@ let
|
|||||||
# this is needed because homedir is created with 700
|
# this is needed because homedir is created with 700
|
||||||
chmod 755 "${cfg.workingDir}"
|
chmod 755 "${cfg.workingDir}"
|
||||||
'';
|
'';
|
||||||
|
PrivateTmp = "yes";
|
||||||
|
|
||||||
User = "root"; # tinc cannot be queried as user,
|
User = "root"; # tinc cannot be queried as user,
|
||||||
# seems to be a tinc-pre issue
|
# seems to be a tinc-pre issue
|
||||||
privateTmp = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,20 +2,21 @@
|
|||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
name = "tinc_graphs-${version}";
|
name = "tinc_graphs-${version}";
|
||||||
version = "0.2.12";
|
version = "0.3.6";
|
||||||
propagatedBuildInputs = with pkgs;[
|
propagatedBuildInputs = with pkgs;[
|
||||||
python3Packages.pygeoip
|
python3Packages.pygeoip
|
||||||
## ${geolite-legacy}/share/GeoIP/GeoIPCity.dat
|
## ${geolite-legacy}/share/GeoIP/GeoIPCity.dat
|
||||||
];
|
];
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://pypi.python.org/packages/source/t/tinc_graphs/tinc_graphs-${version}.tar.gz";
|
url = "https://pypi.python.org/packages/source/t/tinc_graphs/tinc_graphs-${version}.tar.gz";
|
||||||
sha256 = "03jxvxahpcbpnz4668x32b629dwaaz5jcjkyaijm0zzpgcn4cbgp";
|
sha256 = "0ghdx9aaipmppvc2b6cgks4nxw6zsb0fhjrmnisbx7rz0vjvzc74";
|
||||||
};
|
};
|
||||||
preFixup = with pkgs;''
|
preFixup = with pkgs;''
|
||||||
wrapProgram $out/bin/build-graphs --prefix PATH : "$out/bin"
|
wrapProgram $out/bin/build-graphs --prefix PATH : "$out/bin"
|
||||||
wrapProgram $out/bin/all-the-graphs --prefix PATH : "${imagemagick}/bin:${graphviz}/bin:$out/bin"
|
wrapProgram $out/bin/all-the-graphs --prefix PATH : "${imagemagick}/bin:${graphviz}/bin:$out/bin"
|
||||||
wrapProgram $out/bin/tinc-stats2json --prefix PATH : "${tinc}/bin"
|
wrapProgram $out/bin/tinc-stats2json --prefix PATH : "${tinc}/bin"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://krebsco.de/;
|
homepage = http://krebsco.de/;
|
||||||
description = "Create Graphs from Tinc Stats";
|
description = "Create Graphs from Tinc Stats";
|
||||||
|
@ -66,7 +66,10 @@ with lib;
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
tv.iptables.input-internet-accept-new-tcp = singleton "http";
|
tv.iptables.input-internet-accept-new-tcp = singleton "http";
|
||||||
krebs.nginx.servers.cgit.server-names = singleton "cgit.cd.viljetic.de";
|
krebs.nginx.servers.cgit.server-names = [
|
||||||
|
"cgit.cd.krebsco.de"
|
||||||
|
"cgit.cd.viljetic.de"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
# TODO make public_html also available to cd, cd.retiolum (AKA default)
|
# TODO make public_html also available to cd, cd.retiolum (AKA default)
|
||||||
|
Loading…
Reference in New Issue
Block a user