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