2022-06-16 17:23:12 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options.services.expressvpn.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2024-04-21 15:54:59 +00:00
|
|
|
description = ''
|
2022-06-16 17:23:12 +00:00
|
|
|
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" ];
|
2024-01-25 14:12:00 +00:00
|
|
|
wants = [ "network-online.target" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
after = [ "network.target" "network-online.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta.maintainers = with maintainers; [ yureien ];
|
|
|
|
}
|