1 { config, lib, pkgs, ... }:
7 cfg = config.services.teamviewer;
17 services.teamviewer.enable = mkEnableOption "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 wants = [ "network-online.target" ];
34 after = [ "network-online.target" "network.target" "dbus.service" ];
35 requires = [ "dbus.service" ];
36 preStart = "mkdir -pv /var/lib/teamviewer /var/log/teamviewer";
38 startLimitIntervalSec = 60;
42 ExecStart = "${pkgs.teamviewer}/bin/teamviewerd -f";
43 PIDFile = "/run/teamviewerd.pid";
44 ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";