mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 21:49:34 +03:00
commit
ad197d89ae
2 changed files with 46 additions and 0 deletions
|
@ -226,6 +226,7 @@
|
||||||
./services/monitoring/smartd.nix
|
./services/monitoring/smartd.nix
|
||||||
./services/monitoring/statsd.nix
|
./services/monitoring/statsd.nix
|
||||||
./services/monitoring/systemhealth.nix
|
./services/monitoring/systemhealth.nix
|
||||||
|
./services/monitoring/teamviewer.nix
|
||||||
./services/monitoring/ups.nix
|
./services/monitoring/ups.nix
|
||||||
./services/monitoring/uptime.nix
|
./services/monitoring/uptime.nix
|
||||||
./services/monitoring/zabbix-agent.nix
|
./services/monitoring/zabbix-agent.nix
|
||||||
|
|
45
nixos/modules/services/monitoring/teamviewer.nix
Normal file
45
nixos/modules/services/monitoring/teamviewer.nix
Normal file
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue