Move common ACME configs into separate module

This commit is contained in:
Andreas Zweili 2022-05-18 21:17:15 +02:00
parent 6dcb525a6f
commit 3fe353deb4
3 changed files with 19 additions and 17 deletions

View File

@ -0,0 +1,15 @@
{ ... }:
{
networking.firewall.allowedTCPPorts = [
443
];
security.acme = {
acceptTerms = true;
email = "admin+acme@zweili.ch";
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
};
}

View File

@ -1,16 +1,9 @@
{ domain, ... }:
{ domain, inputs, ... }:
{
networking.firewall.allowedTCPPorts = [
443
imports = [
"${inputs.self}/modules/nginx-acme-base"
];
security.acme = {
acceptTerms = true;
email = "admin+acme@zweili.ch";
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;

View File

@ -9,18 +9,12 @@
(import "${inputs.self}/modules/restic-server-client" {
time = "11:30"; inherit config custom inputs pkgs;
})
"${inputs.self}/modules/nginx-acme-base"
"${inputs.self}/modules/docker"
"${inputs.self}/modules/haproxy"
];
security.acme = {
acceptTerms = true;
email = "admin+acme@zweili.ch";
};
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"2li.ch" = {
serverAliases = [ "www.2li.ch" ];