mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-02-04 20:08:53 -05:00
Matrix, Caddy
* Nginx to caddy (#5) Convert all nginx instances to caddy instances, setup acme as well * matrix implemented
This commit is contained in:
parent
742be942bb
commit
e0590ff20b
25 changed files with 182 additions and 484 deletions
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
virtualHosts = {
|
||||
"logs.wanderingcrow.net" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "logs.wanderingcrow.net";
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
allow 192.168.0.0/16;
|
||||
allow ${inputs.nix-secrets.network.primary.publicIP};
|
||||
deny all;
|
||||
'';
|
||||
proxyPass = "http://${builtins.toString config.services.grafana.settings.server.http_addr}:${builtins.toString config.services.grafana.settings.server.http_port}";
|
||||
proxyWebsockets = true;
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/services/system-logging/proxy.nix
Normal file
14
modules/services/system-logging/proxy.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts."logs.wanderingcrow.net".extraConfig = ''
|
||||
@block not remote_ip ${inputs.nix-secrets.network.primary.publicIP} private_ranges
|
||||
abort @block
|
||||
reverse_proxy http://${builtins.toString config.services.grafana.settings.server.http_addr}:${builtins.toString config.services.grafana.settings.server.http_port}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue