mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
Nix
{ 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 ];
|
|
|
|
services.dbus.packages = [ pkgs.teamviewer ];
|
|
|
|
systemd.services.teamviewerd = {
|
|
description = "TeamViewer remote control daemon";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
wants = [ "network-online.target" ];
|
|
after = [ "network-online.target" "network.target" "dbus.service" ];
|
|
requires = [ "dbus.service" ];
|
|
preStart = "mkdir -pv /var/lib/teamviewer /var/log/teamviewer";
|
|
|
|
startLimitIntervalSec = 60;
|
|
startLimitBurst = 10;
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.teamviewer}/bin/teamviewerd -f";
|
|
PIDFile = "/run/teamviewerd.pid";
|
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
|
Restart = "on-abort";
|
|
};
|
|
};
|
|
};
|
|
|
|
}
|