1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6
7 cfg = config.services.logmein-hamachi;
8
9in
10
11{
12
13 ###### interface
14
15 options = {
16
17 services.logmein-hamachi.enable = mkOption {
18 type = types.bool;
19 default = false;
20 description = ''
21 Whether to enable LogMeIn Hamachi, a proprietary
22 (closed source) commercial VPN software.
23 '';
24 };
25
26 };
27
28
29 ###### implementation
30
31 config = mkIf cfg.enable {
32
33 systemd.services.logmein-hamachi = {
34 description = "LogMeIn Hamachi Daemon";
35
36 wantedBy = [ "multi-user.target" ];
37 after = [ "network.target" ];
38
39 serviceConfig = {
40 Type = "forking";
41 ExecStart = "${pkgs.logmein-hamachi}/bin/hamachid";
42 };
43 };
44
45 environment.systemPackages = [ pkgs.logmein-hamachi ];
46
47 };
48
49}