depot/nixos/modules/services/networking/expressvpn.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00: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 ];
}