summaryrefslogtreecommitdiffstats
path: root/shared/2configs/shack/radioactive.nix
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-06-15 21:13:46 +0200
committerlassulus <lass@lassul.us>2017-06-15 21:13:46 +0200
commitc6605a3ab8f6a5098bbd3e011de50e37bf242a05 (patch)
tree57a0868c0dbe34aa553c5175c2f3ab29add0a330 /shared/2configs/shack/radioactive.nix
parentfde07d4e5ed92309ca1c7570c936ec3d324ca2f3 (diff)
parent70260c70943cfcad80c268920566c1a858870b28 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'shared/2configs/shack/radioactive.nix')
-rw-r--r--shared/2configs/shack/radioactive.nix35
1 files changed, 35 insertions, 0 deletions
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;
+ };
+ };
+}