summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorArseniy Seroka <ars.seroka@gmail.com>2015-04-05 17:19:19 +0300
committerArseniy Seroka <ars.seroka@gmail.com>2015-04-05 20:47:01 +0300
commit09982126409076abb35531f1db378355f9ec2600 (patch)
treeb74accf84a2135323aaf65c897baa5e92e4dd482 /nixos/modules
parente07ea5cf77601325b16f51fb457b90d5aadfab6f (diff)
downloadnixpkgs-09982126409076abb35531f1db378355f9ec2600.tar
nixpkgs-09982126409076abb35531f1db378355f9ec2600.tar.gz
nixpkgs-09982126409076abb35531f1db378355f9ec2600.tar.bz2
nixpkgs-09982126409076abb35531f1db378355f9ec2600.tar.lz
nixpkgs-09982126409076abb35531f1db378355f9ec2600.tar.xz
nixpkgs-09982126409076abb35531f1db378355f9ec2600.tar.zst
nixpkgs-09982126409076abb35531f1db378355f9ec2600.zip
impl: teamviewer daemon
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/services/monitoring/teamviewer.nix45
2 files changed, 46 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 23809796878..2ae568458d8 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -219,6 +219,7 @@
   ./services/monitoring/smartd.nix
   ./services/monitoring/statsd.nix
   ./services/monitoring/systemhealth.nix
+  ./services/monitoring/teamviewer.nix
   ./services/monitoring/ups.nix
   ./services/monitoring/uptime.nix
   ./services/monitoring/zabbix-agent.nix
diff --git a/nixos/modules/services/monitoring/teamviewer.nix b/nixos/modules/services/monitoring/teamviewer.nix
new file mode 100644
index 00000000000..beba5dcd1b0
--- /dev/null
+++ b/nixos/modules/services/monitoring/teamviewer.nix
@@ -0,0 +1,45 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+  cfg = config.services.teamviewer;
+
+in
+
+{
+
+  ###### interface
+
+  options = {
+
+    services.teamviewer.enable = mkEnableOption "teamviewer daemon";
+      
+  };
+
+  ###### implementation
+
+  config = mkIf (cfg.enable) {
+
+    environment.systemPackages = [ pkgs.teamviewer ];
+
+    systemd.services.teamviewerd = {
+      description = "TeamViewer remote control daemon";
+
+      wantedBy = [ "graphical.target" ];
+      after = [ "NetworkManager-wait-online.service" "network.target" ];
+
+      serviceConfig = {
+        Type = "forking";
+        ExecStart = "${pkgs.teamviewer}/bin/teamviewerd -d";
+        PIDFile = "/run/teamviewerd.pid";
+        ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
+        Restart = "on-abort";
+        StartLimitInterval = "60";
+        StartLimitBurst = "10";
+      };
+    };
+  };
+
+}