add chn.moe

This commit is contained in:
陈浩南 2023-12-15 20:55:15 +08:00
parent b861d7bfb9
commit e5b13ace75
3 changed files with 24 additions and 0 deletions

View File

@ -256,6 +256,7 @@
synapse-admin.instances."synapse-admin.chn.moe" = {};
catalog.enable = true;
blog.enable = true;
main.enable = true;
};
};
coturn.enable = true;

View File

@ -8,5 +8,6 @@ inputs:
./webdav.nix
./blog.nix
./catalog.nix
./main.nix
];
}

View File

@ -0,0 +1,22 @@
inputs:
{
options.nixos.services.nginx.applications.main = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
};
config =
let
inherit (inputs.config.nixos.services.nginx.applications) main;
in
{
nixos.services.nginx.https."chn.moe".location =
{
"/".return.return = "302 https://xn--s8w913fdga.chn.moe/@chn";
"/.well-known/matrix/server".proxy =
{
setHeaders.Host = "synapse.chn.moe";
upstream = "https://synapse.chn.moe";
};
};
};
}