depot/third_party/nixpkgs/nixos/modules/services/networking/expressvpn.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

28 lines
736 B
Nix

{ config, lib, pkgs, ... }:
{
options.services.expressvpn.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Enable the ExpressVPN daemon.
'';
};
config = lib.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" ];
wants = [ "network-online.target" ];
after = [ "network.target" "network-online.target" ];
};
};
meta.maintainers = with lib.maintainers; [ yureien ];
}