aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/openvpn.nix
blob: abcd1f0eb576abd65c0bc78970acc63a7b197238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ config, lib, pkgs, ... }:

with lib;

let

  cnf = config.cynerd.openvpn;

in {

  options = {
    cynerd.openvpn.enable = mkOption {
      type = types.bool;
      default = false;
      description = "My personal OpenVPN";
    };
  };

  config = mkIf cnf.enable {
    services.openvpn.servers.personal = {
      config = "config /run/secrets/personal.ovpn";
    };
  };

}