fix: centralise with one ssl certificate

This commit is contained in:
Bladesy 2024-12-17 21:42:32 +00:00
parent 80d4030a4c
commit 6c4d35c9fe
3 changed files with 25 additions and 14 deletions

View File

@ -202,9 +202,16 @@
}; };
nginx = { nginx = {
enable = true; enable = true;
virtualHosts."gitea.dylanblades.com" = { virtualHosts = {
"dylanblades.com" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
serverAliases = ["*.dylanblades.com"];
root = pkgs.my-site;
};
"gitea.dylanblades.com" = {
forceSSL = true;
useACMEHost = true;
locations."/" = { locations."/" = {
proxyPass = "http://localhost:3000"; proxyPass = "http://localhost:3000";
extraConfig = '' extraConfig = ''
@ -220,6 +227,7 @@
}; };
}; };
}; };
};
nixpkgs.overlays = [lib.overlays.pkgs]; nixpkgs.overlays = [lib.overlays.pkgs];
environment = { environment = {

View File

@ -1,3 +1,4 @@
{pkgs}: { {pkgs}: {
my-vim = pkgs.callPackage ./my-vim {}; my-vim = pkgs.callPackage ./my-vim {};
my-site = pkgs.callPackage ./my-site {};
} }

View File

@ -0,0 +1,2 @@
{writeTextDir}:
writeTextDir "index.html" "my-site"