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 ''
22 Whether to enable LogMeIn Hamachi, a proprietary
23 (closed source) commercial VPN software.
24 '';
25 };
26
27 };
28
29
30 ###### implementation
31
32 config = mkIf cfg.enable {
33
34 systemd.services.logmein-hamachi = {
35 description = "LogMeIn Hamachi Daemon";
36
37 wantedBy = [ "multi-user.target" ];
38 after = [ "network.target" "local-fs.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}