summary refs log tree commit diff
path: root/nixos/modules/services/monitoring/teamviewer.nix
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/services/monitoring/teamviewer.nix
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/services/monitoring/teamviewer.nix')
-rw-r--r--nixos/modules/services/monitoring/teamviewer.nix45
1 files changed, 45 insertions, 0 deletions
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";
+      };
+    };
+  };
+
+}