python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / nixos / modules / services / monitoring / teamviewer.nix
blob9b1278317943d8056c9e267c1c51b88c9b442f3d
1 { config, lib, pkgs, ... }:
3 with lib;
5 let
7   cfg = config.services.teamviewer;
9 in
13   ###### interface
15   options = {
17     services.teamviewer.enable = mkEnableOption (lib.mdDoc "TeamViewer daemon");
19   };
21   ###### implementation
23   config = mkIf (cfg.enable) {
25     environment.systemPackages = [ pkgs.teamviewer ];
27     services.dbus.packages = [ pkgs.teamviewer ];
29     systemd.services.teamviewerd = {
30       description = "TeamViewer remote control daemon";
32       wantedBy = [ "multi-user.target" ];
33       after = [ "network-online.target" "network.target" "dbus.service" ];
34       requires = [ "dbus.service" ];
35       preStart = "mkdir -pv /var/lib/teamviewer /var/log/teamviewer";
37       startLimitIntervalSec = 60;
38       startLimitBurst = 10;
39       serviceConfig = {
40         Type = "simple";
41         ExecStart = "${pkgs.teamviewer}/bin/teamviewerd -f";
42         PIDFile = "/run/teamviewerd.pid";
43         ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
44         Restart = "on-abort";
45       };
46     };
47   };