feat: analytics server (medama)
This commit is contained in:
14
capytal/analytics.nix
Normal file
14
capytal/analytics.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{config, ...}: let
|
||||
port = config.services.medama.port;
|
||||
in {
|
||||
services.medama.enable = true;
|
||||
services.medama.port = 6010;
|
||||
|
||||
services.caddy.virtualHosts.":${toString (port + 1)}" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy http://localhost:${toString (port + 2)} {
|
||||
header_up X-Real-Ip {remote_host}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
./cloudflare.nix
|
||||
./analytics.nix
|
||||
./network.nix
|
||||
./websites.nix
|
||||
|
||||
|
||||
Reference in New Issue
Block a user