1 { config, lib, pkgs, ... }:
7 cfg = config.services.teamviewer;
17 services.teamviewer.enable = mkEnableOption (lib.mdDoc "TeamViewer daemon");
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;
41 ExecStart = "${pkgs.teamviewer}/bin/teamviewerd -f";
42 PIDFile = "/run/teamviewerd.pid";
43 ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";