yep, more dotfiles

server: add goatcounter

wiro.world 15e00e0e e147f62c

verified
Changed files
+22
nixos
profiles
+22
nixos/profiles/server.nix
···
matrix-port = 3009;
matrix-hostname = "matrix.wiro.world";
+
goatcounter-port = 3010;
+
goatcounter-hostname = "stats.wiro.world";
+
prometheus-port = 9001;
prometheus-node-exporter-port = 9002;
headscale-metrics-port = 9003;
···
}
'' +
''
+
log {
+
level INFO
+
format console
+
output file /tmp/access-wiro.world.log
+
}
+
'' +
+
''
reverse_proxy /.well-known/matrix/* http://localhost:${toString matrix-port}
'' +
''
···
virtualHosts.${matrix-hostname}.extraConfig = ''
reverse_proxy /_matrix/* http://localhost:${toString matrix-port}
+
'';
+
+
virtualHosts.${goatcounter-hostname}.extraConfig = ''
+
reverse_proxy http://localhost:${toString goatcounter-port}
'';
};
···
allow_registration = true;
registration_token_file = config.age.secrets.tuwunel-registration-tokens.path;
};
+
};
+
+
services.goatcounter = {
+
enable = true;
+
+
port = goatcounter-port;
+
proxy = true;
+
extraArgs = [ "-automigrate" ];
};
};
}