infrastructure/depot/services/filehost/default.nix
2021-08-12 03:30:48 +01:00

17 lines
389 B
Nix

{ config, lib, pkgs, ... }:
{
services.nginx.virtualHosts = {
"files.${config.network.dns.domain}" = {
root = "/var/www/files";
enableACME = true;
forceSSL = true;
};
};
deploy.tf.dns.records.services_filehost = {
tld = config.network.dns.tld;
domain = "files";
cname.target = "${config.networking.hostName}.${config.network.dns.tld}";
};
}