Compare commits
2 commits
8d2356a9a4
...
156551b217
| Author | SHA1 | Date | |
|---|---|---|---|
| 156551b217 | |||
| 2058665de0 |
10 changed files with 69 additions and 34 deletions
|
|
@ -49,39 +49,6 @@
|
||||||
networking = {
|
networking = {
|
||||||
usePredictableInterfaceNames = false;
|
usePredictableInterfaceNames = false;
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
|
|
||||||
firewall = {
|
|
||||||
allowedTCPPorts = [
|
|
||||||
# http
|
|
||||||
80
|
|
||||||
443
|
|
||||||
# ssh
|
|
||||||
2222
|
|
||||||
# matrix
|
|
||||||
8448
|
|
||||||
# starbound
|
|
||||||
21025
|
|
||||||
|
|
||||||
config.services.coturn.listening-port
|
|
||||||
config.services.coturn.tls-listening-port
|
|
||||||
config.services.coturn.alt-listening-port
|
|
||||||
config.services.coturn.alt-tls-listening-port
|
|
||||||
];
|
|
||||||
|
|
||||||
allowedUDPPorts = [
|
|
||||||
config.services.coturn.listening-port
|
|
||||||
config.services.coturn.tls-listening-port
|
|
||||||
config.services.coturn.alt-listening-port
|
|
||||||
config.services.coturn.alt-tls-listening-port
|
|
||||||
];
|
|
||||||
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{
|
|
||||||
from = config.services.coturn.min-port;
|
|
||||||
to = config.services.coturn.max-port;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.network.enable = true;
|
systemd.network.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -121,12 +121,18 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
|
import time
|
||||||
|
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
testHost.wait_for_unit("nginx.service")
|
testHost.wait_for_unit("nginx.service")
|
||||||
client.succeed("curl --max-time 10 http://testHost")
|
client.succeed("curl --max-time 10 http://testHost")
|
||||||
|
|
||||||
|
# Wait a bit for the prometheus exporter to scrape our logs
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
res = testHost.succeed("curl localhost:${builtins.toString config.services.prometheus.exporters.nginxlog.port}/metrics")
|
res = testHost.succeed("curl localhost:${builtins.toString config.services.prometheus.exporters.nginxlog.port}/metrics")
|
||||||
assert 'nginxlog_http_response_count_total{method="GET",status="200",vhost="testHost"} 1' in res
|
assert 'nginxlog_http_response_count_total{method="GET",status="200",vhost="testHost"} 1' in res, res
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,36 @@ in
|
||||||
./matrix-hookshot.nix
|
./matrix-hookshot.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
# These are for "normal" clients
|
||||||
|
80
|
||||||
|
443
|
||||||
|
|
||||||
|
# Federation happens on 8448
|
||||||
|
8448
|
||||||
|
|
||||||
|
config.services.coturn.listening-port
|
||||||
|
config.services.coturn.tls-listening-port
|
||||||
|
config.services.coturn.alt-listening-port
|
||||||
|
config.services.coturn.alt-tls-listening-port
|
||||||
|
];
|
||||||
|
|
||||||
|
allowedUDPPorts = [
|
||||||
|
config.services.coturn.listening-port
|
||||||
|
config.services.coturn.tls-listening-port
|
||||||
|
config.services.coturn.alt-listening-port
|
||||||
|
config.services.coturn.alt-tls-listening-port
|
||||||
|
];
|
||||||
|
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = config.services.coturn.min-port;
|
||||||
|
to = config.services.coturn.max-port;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
matrix-conduit = {
|
matrix-conduit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,11 @@ in
|
||||||
{
|
{
|
||||||
imports = [ flake-inputs.foundryvtt.nixosModules.foundryvtt ];
|
imports = [ flake-inputs.foundryvtt.nixosModules.foundryvtt ];
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
foundryvtt = {
|
foundryvtt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,11 @@ let
|
||||||
domain = "gitea.${config.services.nginx.domain}";
|
domain = "gitea.${config.services.nginx.domain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
forgejo = {
|
forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,11 @@ let
|
||||||
hostName = "immich.${config.services.nginx.domain}";
|
hostName = "immich.${config.services.nginx.domain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
immich = {
|
immich = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,11 @@ let
|
||||||
domain = "metrics.${config.services.nginx.domain}";
|
domain = "metrics.${config.services.nginx.domain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,11 @@ let
|
||||||
hostName = "nextcloud.${config.services.nginx.domain}";
|
hostName = "nextcloud.${config.services.nginx.domain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
nextcloud = {
|
nextcloud = {
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ let
|
||||||
inherit (lib) concatStringsSep;
|
inherit (lib) concatStringsSep;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [ 21025 ];
|
||||||
|
|
||||||
# Sadly, steam-run requires some X libs
|
# Sadly, steam-run requires some X libs
|
||||||
environment.noXlibs = false;
|
environment.noXlibs = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,11 @@ let
|
||||||
inherit (config.services.nginx) domain;
|
inherit (config.services.nginx) domain;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
services.tlaternet-webserver = {
|
services.tlaternet-webserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listen = {
|
listen = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue