This commit is contained in:
2024-12-27 22:46:49 +02:00
parent 4c8df07652
commit 9bc8752b0a

View File

@@ -1,43 +1,52 @@
{ pkgs, ... }: {
services.nginx = {
enable = true;
# virtualHosts."kyren.codes" = {
# forceSSL = true;
# enableACME = true;
# # useACMEHost = "kyren.codes";
# locations."/" = {
# proxyPass = "85.170.113.195:3000";
# };
# };
virtualHosts."kyren.codes" = {
# services.nginx = {
# enable = true;
# # virtualHosts."kyren.codes" = {
# # forceSSL = true;
# # enableACME = true;
# # # useACMEHost = "kyren.codes";
# # locations."/" = {
# # proxyPass = "85.170.113.195:3000";
# # };
# # };
#
# virtualHosts."kyren.codes" = {
# forceSSL = true;
# enableACME = true;
# # listen = [{
# # addr = "0.0.0.0";
# # port = 3000;
# # }];
#
# locations."/" = {
# index = "index.html";
# root = "/srv/website";
# };
#
# # locations."/404.html" = {
# # root = "/srv/website";
# # };
# # extraConfig = ''
# # error_page 404 /404.html;
# # '';
#
# };
# };
services.nginx.enable = true;
services.nginx.virtualHosts."test.kyren.codes" = {
# enableACME = true;
forceSSL = true;
enableACME = true;
# listen = [{
# addr = "0.0.0.0";
# port = 3000;
# }];
locations."/" = {
index = "index.html";
root = "/srv/website";
};
# locations."/404.html" = {
# root = "/srv/website";
# };
# extraConfig = ''
# error_page 404 /404.html;
# '';
};
};
security.acme = {
acceptTerms = true;
defaults.email = "kyren223@proton.me";
certs."kyren.codes" = {
extraDomainNames = [ "*.kyren.codes" ];
extraDomainNames = [ "test.kyren.codes" ];
webroot = null;
dnsProvider = "cloudflare";
environmentFile = "${pkgs.writeText "cf-creds" ''