Update a lot of options, simplify variables, replace options with tags
This commit is contained in:
parent
dbc0ab6dd3
commit
7667ef9a1b
147 changed files with 663 additions and 928 deletions
6
hosts/midas/services/nginx/default.nix
Normal file
6
hosts/midas/services/nginx/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./nixfox ];
|
||||
|
||||
services.nginx.enable = true;
|
||||
}
|
29
hosts/midas/services/nginx/nixfox/default.nix
Normal file
29
hosts/midas/services/nginx/nixfox/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts = {
|
||||
"www.nixfox.ca" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
default = true;
|
||||
root = "/var/www/landing-page";
|
||||
};
|
||||
"nixfox.ca" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
globalRedirect = "www.nixfox.ca";
|
||||
locations = {
|
||||
"/.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" }';
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue