1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-20 08:29:20 +03: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.

37 lines
766 B
Nix
Raw Permalink Normal View History

2022-05-28 20:10:53 +05:30
{
config,
lib,
pkgs,
...
}:
{
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.
'';
};
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" ];
wants = [ "network-online.target" ];
2022-05-28 20:10:53 +05:30
after = [
"network.target"
"network-online.target"
];
};
};
meta.maintainers = with lib.maintainers; [ yureien ];
2022-05-28 20:10:53 +05:30
}