From 642583145200f5a2cb8be1b38707e2b2ea3dc3e5 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 25 Oct 2015 21:54:59 +0100 Subject: k 3 tinc_graphs: is now completely self-contained --- krebs/3modules/tinc_graphs.nix | 7 +++++-- krebs/5pkgs/tinc_graphs/default.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 krebs/5pkgs/tinc_graphs/default.nix (limited to 'krebs') diff --git a/krebs/3modules/tinc_graphs.nix b/krebs/3modules/tinc_graphs.nix index a6c628353..e415d20ab 100644 --- a/krebs/3modules/tinc_graphs.nix +++ b/krebs/3modules/tinc_graphs.nix @@ -95,8 +95,12 @@ let ExecStartPre = pkgs.writeScript "tinc_graphs-init" '' #!/bin/sh + mkdir -p "${internal_dir}" "${external_dir}" if ! test -e "${cfg.workingDir}/internal/index.html"; then - cp -fr "$(${pkgs.tinc_graphs}/bin/tincstats-static-dir)/internal/" "${internal_dir}" + cp -fr "$(${pkgs.tinc_graphs}/bin/tincstats-static-dir)/internal/." "${internal_dir}" + fi + if ! test -e "${cfg.workingDir}/external/index.html"; then + cp -fr "$(${pkgs.tinc_graphs}/bin/tincstats-static-dir)/external/." "${external_dir}" fi ''; @@ -118,7 +122,6 @@ let users.extraUsers.tinc_graphs = { uid = 3925439960; #genid tinc_graphs home = "/var/spool/tinc_graphs"; - createHome = true; }; krebs.nginx.servers = mkIf cfg.nginx.enable { diff --git a/krebs/5pkgs/tinc_graphs/default.nix b/krebs/5pkgs/tinc_graphs/default.nix new file mode 100644 index 000000000..3040cabe8 --- /dev/null +++ b/krebs/5pkgs/tinc_graphs/default.nix @@ -0,0 +1,26 @@ +{stdenv,fetchurl,pkgs,python3Packages, ... }: + +python3Packages.buildPythonPackage rec { + name = "tinc_graphs-${version}"; + version = "0.3.8"; + propagatedBuildInputs = with pkgs;[ + python3Packages.pygeoip + ## ${geolite-legacy}/share/GeoIP/GeoIPCity.dat + ]; + src = fetchurl { + url = "https://pypi.python.org/packages/source/t/tinc_graphs/tinc_graphs-${version}.tar.gz"; + sha256 = "0jc014ipx9pbx5dwi9s5n921c2c26m5vvzrvpjmca550gpdqd5f4"; + }; + preFixup = with pkgs;'' + 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/tinc-stats2json --prefix PATH : "${tinc}/bin" + ''; + + meta = { + homepage = http://krebsco.de/; + description = "Create Graphs from Tinc Stats"; + license = stdenv.lib.licenses.wtfpl; + }; +} + -- cgit v1.2.3 From cb1b101dfa2c8e0aa9a3ef0c64788912e0148085 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 26 Oct 2015 00:02:51 +0100 Subject: tinc_graphs: clean up mv {makefu,krebs} --- krebs/5pkgs/tinc_graphs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/tinc_graphs/default.nix b/krebs/5pkgs/tinc_graphs/default.nix index 3040cabe8..e5f1e40e8 100644 --- a/krebs/5pkgs/tinc_graphs/default.nix +++ b/krebs/5pkgs/tinc_graphs/default.nix @@ -2,14 +2,14 @@ python3Packages.buildPythonPackage rec { name = "tinc_graphs-${version}"; - version = "0.3.8"; + version = "0.3.9"; propagatedBuildInputs = with pkgs;[ python3Packages.pygeoip ## ${geolite-legacy}/share/GeoIP/GeoIPCity.dat ]; src = fetchurl { url = "https://pypi.python.org/packages/source/t/tinc_graphs/tinc_graphs-${version}.tar.gz"; - sha256 = "0jc014ipx9pbx5dwi9s5n921c2c26m5vvzrvpjmca550gpdqd5f4"; + sha256 = "0hjmkiclvyjb3707285x4b8mk5aqjcvh383hvkad1h7p1n61qrfx"; }; preFixup = with pkgs;'' wrapProgram $out/bin/build-graphs --prefix PATH : "$out/bin" -- cgit v1.2.3 From 526adba3c81d267266946e7fc96a4a3b51cab366 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 26 Oct 2015 00:04:15 +0100 Subject: k 3 urlwatch: add verbose flag --- krebs/3modules/urlwatch.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/urlwatch.nix b/krebs/3modules/urlwatch.nix index 80d9f5e93..206bc5697 100644 --- a/krebs/3modules/urlwatch.nix +++ b/krebs/3modules/urlwatch.nix @@ -56,6 +56,13 @@ let https://nixos.org/channels/nixos-unstable/git-revision ]; }; + verbose = mkOption { + type = types.bool; + default = false; + description = '' + verbose output of urlwatch + ''; + }; }; urlsFile = toFile "urls" (concatStringsSep "\n" cfg.urls); @@ -106,7 +113,7 @@ let cd /tmp - urlwatch -e --urls="$urlsFile" > changes 2>&1 || : + urlwatch -e ${optionalString cfg.verbose "-v"} --urls="$urlsFile" > changes || : if test -s changes; then date=$(date -R) -- cgit v1.2.3 From 8c9c74a03bfc1aa7b74bd1d4098851075608f311 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 27 Oct 2015 18:10:32 +0100 Subject: k 5 collectd-connect-time: initial commit --- krebs/5pkgs/collectd-connect-time/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 krebs/5pkgs/collectd-connect-time/default.nix (limited to 'krebs') diff --git a/krebs/5pkgs/collectd-connect-time/default.nix b/krebs/5pkgs/collectd-connect-time/default.nix new file mode 100644 index 000000000..bff4928cc --- /dev/null +++ b/krebs/5pkgs/collectd-connect-time/default.nix @@ -0,0 +1,15 @@ +{lib, pkgs, pythonPackages, fetchurl, ... }: + +pythonPackages.buildPythonPackage rec { + name = "collectd-connect-time-${version}"; + version = "0.1.1"; + src = fetchurl { + url = "https://pypi.python.org/packages/source/c/collectd-connect-time/collectd-connect-time-${version}.tar.gz"; + sha256 = "0j2glcm4qjry1hqgci84ifj83xjpannl5yckyjadc8s9vyf0mp99"; + }; + meta = { + homepage = https://pypi.python.org/pypi/collectd-connect-time/; + description = "TCP Connection time plugin for collectd"; + license = lib.licenses.wtfpl; + }; +} -- cgit v1.2.3 From d394cd26de014c718431b970c7d8e47a725a8202 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 27 Oct 2015 18:59:46 +0100 Subject: k 5 collectd-connect-time: bump to 0.2.0 --- krebs/5pkgs/collectd-connect-time/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/collectd-connect-time/default.nix b/krebs/5pkgs/collectd-connect-time/default.nix index bff4928cc..c94bf21a6 100644 --- a/krebs/5pkgs/collectd-connect-time/default.nix +++ b/krebs/5pkgs/collectd-connect-time/default.nix @@ -2,10 +2,10 @@ pythonPackages.buildPythonPackage rec { name = "collectd-connect-time-${version}"; - version = "0.1.1"; + version = "0.2.0"; src = fetchurl { url = "https://pypi.python.org/packages/source/c/collectd-connect-time/collectd-connect-time-${version}.tar.gz"; - sha256 = "0j2glcm4qjry1hqgci84ifj83xjpannl5yckyjadc8s9vyf0mp99"; + sha256 = "1l63pi79z6vg4xf744a71g5rxgsngpkc96a7y4ha2x798r55g7v6"; }; meta = { homepage = https://pypi.python.org/pypi/collectd-connect-time/; -- cgit v1.2.3 From bbd28caa40c06574653fc8364157721c562eabbb Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 28 Oct 2015 00:42:36 +0100 Subject: krebs 5 collectd-connect-time: bump version (again) --- krebs/5pkgs/collectd-connect-time/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/5pkgs/collectd-connect-time/default.nix b/krebs/5pkgs/collectd-connect-time/default.nix index c94bf21a6..b07a119db 100644 --- a/krebs/5pkgs/collectd-connect-time/default.nix +++ b/krebs/5pkgs/collectd-connect-time/default.nix @@ -2,10 +2,10 @@ pythonPackages.buildPythonPackage rec { name = "collectd-connect-time-${version}"; - version = "0.2.0"; + version = "0.2.1"; src = fetchurl { url = "https://pypi.python.org/packages/source/c/collectd-connect-time/collectd-connect-time-${version}.tar.gz"; - sha256 = "1l63pi79z6vg4xf744a71g5rxgsngpkc96a7y4ha2x798r55g7v6"; + sha256 = "0611h53ww9lk1qm27njsffckkibirmq7p8cxlq02dgl1zbh7583d"; }; meta = { homepage = https://pypi.python.org/pypi/collectd-connect-time/; -- cgit v1.2.3 From c6ca11062ab3a1e2f6903a08ba57bf394bfa05e3 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 28 Oct 2015 15:06:41 +0100 Subject: m 1 gum: prepare stockholm --- krebs/3modules/makefu/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index e36a083f2..7c0aacbb7 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -214,9 +214,10 @@ with lib; extraZones = { "krebsco.de" = '' - omo IN A ${head nets.internet.addrs4} euer IN A ${head nets.internet.addrs4} + euer.blog IN A ${head nets.internet.addrs4} gum IN A ${head nets.internet.addrs4} + euer.wiki IN A ${head nets.internet.addrs4} ''; }; nets = { -- cgit v1.2.3 From 84ebd8c02132131d893fd9bb92ea523e59272649 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 28 Oct 2015 21:31:07 +0100 Subject: m 1 wry: serve euer wiki --- krebs/3modules/makefu/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'krebs') diff --git a/krebs/3modules/makefu/default.nix b/krebs/3modules/makefu/default.nix index 7c0aacbb7..2d33b9275 100644 --- a/krebs/3modules/makefu/default.nix +++ b/krebs/3modules/makefu/default.nix @@ -164,6 +164,7 @@ with lib; dc = "makefu"; #dc = "cac"; extraZones = { "krebsco.de" = '' + wiki.euer IN A ${head nets.internet.addrs4} wry IN A ${head nets.internet.addrs4} io IN NS wry.krebsco.de. graphs IN A ${head nets.internet.addrs4} @@ -189,6 +190,7 @@ with lib; "paste.wry.retiolum" "paste.retiolum" "wry.retiolum" + "wiki.makefu.retiolum" ]; tinc.pubkey = '' -----BEGIN RSA PUBLIC KEY----- @@ -215,9 +217,8 @@ with lib; extraZones = { "krebsco.de" = '' euer IN A ${head nets.internet.addrs4} - euer.blog IN A ${head nets.internet.addrs4} + share.euer IN A ${head nets.internet.addrs4} gum IN A ${head nets.internet.addrs4} - euer.wiki IN A ${head nets.internet.addrs4} ''; }; nets = { -- cgit v1.2.3