1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00
nixpkgs/nixos/modules/services/networking/expressvpn.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
688 B
Nix
Raw Normal View History

2022-05-28 15:40:53 +01: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" ];
after = [ "network.target" "network-online.target" ];
};
};
meta.maintainers = with maintainers; [ yureien ];
}