nixos/modules/services/nginx/applications/main.nix

24 lines
639 B
Nix
Raw Normal View History

2023-12-15 20:55:15 +08:00
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;
2023-12-29 20:22:21 +08:00
inherit (inputs.lib) mkIf;
in mkIf main.enable
2023-12-15 20:55:15 +08:00
{
nixos.services.nginx.https."chn.moe".location =
{
"/".return.return = "302 https://xn--s8w913fdga.chn.moe/@chn";
"/.well-known/matrix/server".proxy =
{
setHeaders.Host = "matrix.chn.moe";
upstream = "https://matrix.chn.moe";
2023-12-15 20:55:15 +08:00
};
};
};
}