aboutsummaryrefslogtreecommitdiff
path: root/systems/eldiron/websites/vpn/default.nix
blob: 3ee0a202f9376cb020a577c4894e4ae60c140061 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ lib, pkgs, config,  ... }:
let
  cfg = config.myServices.vpn;
in {
  config = lib.mkIf cfg.enable {
    security.acme.certs.eldiron.extraDomainNames = [ "vpn.immae.eu" ];
    services.websites.env.tools.vhostConfs.vpn = {
      certName    = "eldiron";
      hosts       = [ "vpn.immae.eu" ];
      root        = ./www;
      extraConfig = [
        ''
          Alias /hosts.tar.gz "${config.myServices.vpn.hostsPath}"
        ''
      ];
    };
  };
}