Merge pull request #7181 from jagajaga/teamviewer

Teamviewer

+46
+1
nixos/modules/module-list.nix
··· 226 226 ./services/monitoring/smartd.nix 227 227 ./services/monitoring/statsd.nix 228 228 ./services/monitoring/systemhealth.nix 229 + ./services/monitoring/teamviewer.nix 229 230 ./services/monitoring/ups.nix 230 231 ./services/monitoring/uptime.nix 231 232 ./services/monitoring/zabbix-agent.nix
+45
nixos/modules/services/monitoring/teamviewer.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + 7 + cfg = config.services.teamviewer; 8 + 9 + in 10 + 11 + { 12 + 13 + ###### interface 14 + 15 + options = { 16 + 17 + services.teamviewer.enable = mkEnableOption "teamviewer daemon"; 18 + 19 + }; 20 + 21 + ###### implementation 22 + 23 + config = mkIf (cfg.enable) { 24 + 25 + environment.systemPackages = [ pkgs.teamviewer ]; 26 + 27 + systemd.services.teamviewerd = { 28 + description = "TeamViewer remote control daemon"; 29 + 30 + wantedBy = [ "graphical.target" ]; 31 + after = [ "NetworkManager-wait-online.service" "network.target" ]; 32 + 33 + serviceConfig = { 34 + Type = "forking"; 35 + ExecStart = "${pkgs.teamviewer}/bin/teamviewerd -d"; 36 + PIDFile = "/run/teamviewerd.pid"; 37 + ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; 38 + Restart = "on-abort"; 39 + StartLimitInterval = "60"; 40 + StartLimitBurst = "10"; 41 + }; 42 + }; 43 + }; 44 + 45 + }