Devariable domains

This commit is contained in:
Jimbo 2025-02-25 03:03:43 -05:00
parent 2c4749f2cc
commit 984b12819e
55 changed files with 152 additions and 179 deletions

View file

@ -1,7 +1,7 @@
{ ... }:
{
imports = [
./p1
./p2
./nixfox
./jimbosfiles
];
}

View file

@ -1,16 +1,16 @@
{ config, lib, ... }:
{
services.nginx.virtualHosts."${config.domains.p1}" = lib.mkIf config.system.server.enable {
services.nginx.virtualHosts."jimbosfiles.com" = lib.mkIf config.system.server.enable {
enableACME = true;
addSSL = true;
globalRedirect = "www.${config.domains.p2}";
globalRedirect = "www.nixfox.ca";
locations = {
"/.well-known/matrix/client".extraConfig = ''
default_type application/json;
return 200 '
{
"m.homeserver": {
"base_url": "https://matrix.${config.domains.p1}"
"base_url": "https://matrix.jimbosfiles.com"
},
"m.identity_server": {
"base_url": "https://matrix.org"
@ -20,7 +20,7 @@
'';
"/.well-known/matrix/server".extraConfig = ''
default_type application/json;
return 200 '{ "m.server": "matrix.${config.domains.p1}:443" }';
return 200 '{ "m.server": "matrix.jimbosfiles.com:443" }';
'';
};
};

View file

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