2022-05-28 20:10:53 +05:30
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
2024-08-28 21:19:06 +02:00
|
|
|
options.services.expressvpn.enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2022-05-28 20:10:53 +05:30
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Enable the ExpressVPN daemon.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-08-28 21:19:06 +02:00
|
|
|
config = lib.mkIf config.services.expressvpn.enable {
|
2022-05-28 20:10:53 +05:30
|
|
|
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-03 22:21:50 -07:00
|
|
|
wants = [ "network-online.target" ];
|
2022-05-28 20:10:53 +05:30
|
|
|
after = [ "network.target" "network-online.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-28 21:19:06 +02:00
|
|
|
meta.maintainers = with lib.maintainers; [ yureien ];
|
2022-05-28 20:10:53 +05:30
|
|
|
}
|