diff options
author | makefu <github@syntax-fehler.de> | 2017-06-06 14:03:24 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-06-06 14:03:24 +0200 |
commit | 777adbb420c8b046b0c222d7f0b8480c32f9a8c0 (patch) | |
tree | dfe59d879f9cb18c1d9688d434c0decca75735a1 | |
parent | d29217c88bec4023736c77877fd778a13e78b3b3 (diff) |
s 1 wolf: enable radioactive
-rw-r--r-- | shared/1systems/wolf.nix | 8 | ||||
-rw-r--r-- | shared/2configs/shack/radioactive.nix | 35 |
2 files changed, 39 insertions, 4 deletions
diff --git a/shared/1systems/wolf.nix b/shared/1systems/wolf.nix index 9acc5894b..f50fc80c4 100644 --- a/shared/1systems/wolf.nix +++ b/shared/1systems/wolf.nix @@ -7,7 +7,6 @@ in ../. <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ../2configs/collectd-base.nix - ../2configs/shack/share.nix ../2configs/central-stats-client.nix ../2configs/save-diskspace.nix @@ -15,11 +14,13 @@ in ../2configs/graphite.nix ../2configs/repo-sync.nix ../2configs/shared-buildbot.nix - ../2configs/shack/drivedroid.nix - ../2configs/shack/nix-cacher.nix + ../2configs/shack/drivedroid.nix + # ../2configs/shack/nix-cacher.nix ../2configs/shack/mqtt_sub.nix ../2configs/shack/muell_caller.nix + ../2configs/shack/radioactive.nix + ../2configs/shack/share.nix ]; # use your own binary cache, fallback use cache.nixos.org (which is used by @@ -42,7 +43,6 @@ in nix = { binaryCaches = [ - "http://localhost:3142/nixos" "http://cache.prism.r" "https://cache.nixos.org/" ]; 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 <stockholm/lib>; +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; + }; + }; +} |