summaryrefslogtreecommitdiffstats
path: root/shared/2configs/shack/radioactive.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-06-18 16:12:54 +0200
committertv <tv@krebsco.de>2017-06-18 16:12:54 +0200
commitfaea33e1cb18010ac60f677ac2c18e813e284cc7 (patch)
tree5ab4189768992e16aa2ed9bc4a509157b544bba6 /shared/2configs/shack/radioactive.nix
parent9f75e81c5f91aa4236f86c29437de190503ad586 (diff)
parentbf62457ec2655ba4d6ef24c1eb801a80cb7b96bf (diff)
Merge remote-tracking branch 'prism/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;
+ };
+ };
+}