nixos-config/modules/system/services/server/webserver/nginx/virtualhosts/jimbosfiles/default.nix

28 lines
750 B
Nix
Raw Normal View History

2025-01-02 00:43:00 -05:00
{ config, lib, ... }:
{
2025-02-25 03:03:43 -05:00
services.nginx.virtualHosts."jimbosfiles.com" = lib.mkIf config.system.server.enable {
2025-01-02 00:43:00 -05:00
enableACME = true;
addSSL = true;
2025-02-25 03:03:43 -05:00
globalRedirect = "www.nixfox.ca";
2025-01-02 00:43:00 -05:00
locations = {
"/.well-known/matrix/client".extraConfig = ''
default_type application/json;
return 200 '
{
"m.homeserver": {
2025-02-25 03:03:43 -05:00
"base_url": "https://matrix.jimbosfiles.com"
2025-01-02 00:43:00 -05:00
},
"m.identity_server": {
"base_url": "https://matrix.org"
}
}
';
'';
"/.well-known/matrix/server".extraConfig = ''
default_type application/json;
2025-02-25 03:03:43 -05:00
return 200 '{ "m.server": "matrix.jimbosfiles.com:443" }';
2025-01-02 00:43:00 -05:00
'';
};
};
}