From 777adbb420c8b046b0c222d7f0b8480c32f9a8c0 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 6 Jun 2017 14:03:24 +0200 Subject: s 1 wolf: enable radioactive --- shared/2configs/shack/radioactive.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 shared/2configs/shack/radioactive.nix (limited to 'shared/2configs') diff --git a/shared/2configs/shack/radioactive.nix b/shared/2configs/shack/radioactive.nix new file mode 100644 index 000000000..378b54056 --- /dev/null +++ b/shared/2configs/shack/radioactive.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +with import ; +let + pkg = pkgs.stdenv.mkDerivation { + name = "radioactive-2017-06-01"; + src = pkgs.fetchgit { + url = "https://github.com/makefu/nagios-radioactiveathome-plugins/"; + rev = "955f614"; + sha256 = "0ql6npl3n6shvij0ly6a52yjmf7dc31c5x29y927k9lvp8ygin20"; + }; + buildInputs = [ + (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ + docopt + requests2 + python + ])) + ]; + installPhase = '' + install -m755 -D add_many_points.py $out/bin/radioactive-add-many + ''; + }; +in { + systemd.services.radioactive = { + description = "radioactive"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = "nobody"; # TODO separate user + ExecStart = "${pkg}/bin/radioactive-add-many loop 60"; + Restart = "always"; + PrivateTmp = true; + PermissionsStartOnly = true; + }; + }; +} -- cgit v1.2.3