Generalization and removal of legacy url

This commit is contained in:
Vice 2025-03-06 21:25:21 -05:00
parent c15fab234d
commit 8bdec44465
25 changed files with 91 additions and 114 deletions

View file

@ -0,0 +1,7 @@
{ config, lib, ... }:
{
security.acme = lib.mkIf config.services.nginx.enable {
acceptTerms = true;
defaults.email = "contact@example.com";
};
}

View file

@ -0,0 +1,17 @@
{ config, lib, ... }:
{
imports = [ ./virtualhosts ];
services.nginx = {
enable = config.system.server.enable;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
networking.firewall.allowedTCPPorts = [
80
443
];
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./example
];
}

View file

@ -0,0 +1,16 @@
{ config, lib, ... }:
{
services.nginx.virtualHosts = lib.mkIf config.system.server.enable {
"www.example.com" = {
enableACME = true;
addSSL = true;
default = true;
root = "/var/www/landing-page";
};
"example.com" = {
enableACME = true;
addSSL = true;
globalRedirect = "www.example.com";
};
};
}