mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
21 lines
572 B
Nix
21 lines
572 B
Nix
{ pkgs, lib, config, ... }: {
|
|
options.mods.server.nginx = {
|
|
enable = lib.mkEnableOption {
|
|
default = false;
|
|
description = "enables nginx reverse proxy";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.mods.server.nginx.enable {
|
|
services.nginx = {
|
|
recommendedProxySettings = true;
|
|
virtualHosts."*.muon.host" = {
|
|
locations."/" = {
|
|
proxyPass = "http://100.112.114.27:443";
|
|
proxyWebsockets = true; # needed if you need to use WebSocket
|
|
extraConfig = "proxy_ssl_server_name on;";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|