nixos-config/hosts/midas/services/nginx/nixfox/default.nix
2025-07-12 13:54:57 -04:00

44 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
services.nginx.virtualHosts = {
"nixfox.ca" = {
default = true;
enableACME = true;
addSSL = true;
root = "/var/www/nixfox-reborn/public";
locations = {
"/".extraConfig = ''
error_page 404 /404.html;
'';
"~ \\.php$".extraConfig = ''
fastcgi_index index.php;
fastcgi_pass unix:${config.services.phpfpm.pools.nginx.socket};
'';
"/.well-known/matrix/client".extraConfig = ''
default_type application/json;
return 200 '{
"m.homeserver": { "base_url": "https://matrix.nixfox.ca" },
"m.identity_server": { "base_url": "https://matrix.org" }
}';
'';
"/.well-known/matrix/server".extraConfig = ''
default_type application/json;
return 200 '{ "m.server": "matrix.nixfox.ca:443" }';
'';
};
};
"old.nixfox.ca" = {
enableACME = true;
addSSL = true;
root = "/var/www/landing-page";
};
};
environment.systemPackages = with pkgs; [ zola ];
}