2022-05-28 14:40:53 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options.services.expressvpn.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Enable the ExpressVPN daemon.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.expressvpn.enable {
|
|
|
|
boot.kernelModules = [ "tun" ];
|
|
|
|
|
|
|
|
systemd.services.expressvpn = {
|
|
|
|
description = "ExpressVPN Daemon";
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${pkgs.expressvpn}/bin/expressvpnd";
|
|
|
|
Restart = "on-failure";
|
|
|
|
RestartSec = 5;
|
|
|
|
};
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
2023-10-04 05:21:50 +00:00
|
|
|
wants = [ "network-online.target" ];
|
2022-05-28 14:40:53 +00:00
|
|
|
after = [ "network.target" "network-online.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = with maintainers; [ yureien ];
|
|
|
|
}
|