diff options
author | Arseniy Seroka <ars.seroka@gmail.com> | 2015-04-05 17:19:19 +0300 |
---|---|---|
committer | Arseniy Seroka <ars.seroka@gmail.com> | 2015-04-05 20:47:01 +0300 |
commit | 09982126409076abb35531f1db378355f9ec2600 (patch) | |
tree | b74accf84a2135323aaf65c897baa5e92e4dd482 /nixos/modules/services/monitoring/teamviewer.nix | |
parent | e07ea5cf77601325b16f51fb457b90d5aadfab6f (diff) | |
download | nixpkgs-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.nix | 45 |
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"; + }; + }; + }; + +} |