From c38f02c4d7a09cd8a1fd50b68f08338ae54a82bb Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 17 Jul 2019 00:53:56 +0200 Subject: shack/s3-power: update revision --- krebs/1systems/wolf/config.nix | 2 ++ krebs/2configs/shack/mqtt.nix | 14 ++++++++++++++ krebs/2configs/shack/s3-power.nix | 4 ++-- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 krebs/2configs/shack/mqtt.nix diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix index d2f0eaeb..270a0056 100644 --- a/krebs/1systems/wolf/config.nix +++ b/krebs/1systems/wolf/config.nix @@ -47,6 +47,8 @@ in ## Collect radioactive data and put into graphite + ## mqtt.shack + ## Collect local statistics via collectd and send to collectd diff --git a/krebs/2configs/shack/mqtt.nix b/krebs/2configs/shack/mqtt.nix new file mode 100644 index 00000000..5e7a1af7 --- /dev/null +++ b/krebs/2configs/shack/mqtt.nix @@ -0,0 +1,14 @@ +{ + network.firewall.allowedTCPPorts = [ 1883 ]; + network.firewall.allowedUDPPorts = [ 1883 ]; + services.mosquitto = { + enable = true; + host = "0.0.0.0"; + users = {}; + # TODO: secure that shit + aclExtraConf = '' + pattern readwrite /# + ''; + allowAnonymous = true; + }; +} diff --git a/krebs/2configs/shack/s3-power.nix b/krebs/2configs/shack/s3-power.nix index 2b136478..40c42260 100644 --- a/krebs/2configs/shack/s3-power.nix +++ b/krebs/2configs/shack/s3-power.nix @@ -4,8 +4,8 @@ let pkg = pkgs.callPackage ( pkgs.fetchgit { url = "https://git.shackspace.de/rz/s3-power"; - rev = "36df203a8fc1af02b08f60ab8d49c849b01e711f"; - sha256 = "sha256:0i05vllnfwj02sfpmg2m8hy0zq27kww9ampiaix6dl5wbyjlp51j"; + rev = "b2b87b56bb40d714dbbecd1285566870b256aec4"; + sha256 = "sha256:02wikwf3rgkkggwbwqisdvhlwd38w5pw011xhwvhnj114s3rynan"; }) {}; home = "/var/lib/s3-power"; cfg = toString ; -- cgit v1.2.3