depot/third_party/nixpkgs/nixos/modules/services/networking/expressvpn.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

29 lines
698 B
Nix

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