mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
Services overhaul (remove all virtualhosts.nix, ...)
This commit is contained in:
parent
b95636d658
commit
afa161955d
17 changed files with 156 additions and 162 deletions
|
|
@ -9,19 +9,22 @@ This module:
|
|||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
deploy.tf.dns.records."ygg_${config.networking.hostName}" =
|
||||
mkIf (config.network.yggdrasil.enable) {
|
||||
config = mkIf (config.network.yggdrasil.enable) {
|
||||
deploy.tf.dns.records."ygg_${config.networking.hostName}" = {
|
||||
tld = config.kw.dns.tld;
|
||||
domain = "${config.networking.hostName}.${config.kw.dns.ygg_prefix}";
|
||||
aaaa.address = config.network.yggdrasil.address;
|
||||
};
|
||||
security.acme.certs."${config.networking.hostName}.${config.kw.dns.ygg_prefix}.${config.kw.dns.domain}" =
|
||||
mkIf (config.services.nginx.enable && config.network.yggdrasil.enable) {
|
||||
mkIf (config.services.nginx.enable) {
|
||||
domain = "${config.networking.hostName}.${config.kw.dns.ygg_prefix}.${config.kw.dns.domain}";
|
||||
dnsProvider = "rfc2136";
|
||||
credentialsFile = config.secrets.files.dns_creds.path;
|
||||
group = "nginx";
|
||||
};
|
||||
services.nginx.virtualHosts."${config.networking.hostName}.${config.kw.dns.ygg_prefix}.${config.kw.dns.domain}" = mkIf (config.services.nginx.enable) {
|
||||
useACMEHost = "${config.networking.hostName}.${config.kw.dns.ygg_prefix}.${config.kw.dns.domain}";
|
||||
forceSSL = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue