summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-23 02:59:38 +0100
committerMel <einebeere@gmail.com>2024-12-23 02:59:38 +0100
commit4b0e9071bf1043c5db168fa620137273f13aa64e (patch)
tree372eb61d6321e3dc7f30ebeeb2e5da6c1e4d7a25
parent42c35b6333fad97c48762a39c2e079c80bf7833e (diff)
downloadnetwork-4b0e9071bf1043c5db168fa620137273f13aa64e.tar.zst
network-4b0e9071bf1043c5db168fa620137273f13aa64e.zip
Add access log directives and service listings to all hosts
Signed-off-by: Mel <einebeere@gmail.com>
-rw-r--r--machines/corsac/default.nix5
-rw-r--r--machines/lapin/default.nix13
-rw-r--r--machines/renard/default.nix28
-rw-r--r--modules/jellyfin.nix3
-rw-r--r--modules/www.nix3
-rw-r--r--services/conduwuit.nix2
-rw-r--r--services/immich.nix2
7 files changed, 48 insertions, 8 deletions
diff --git a/machines/corsac/default.nix b/machines/corsac/default.nix
index d38d06a..f579884 100644
--- a/machines/corsac/default.nix
+++ b/machines/corsac/default.nix
@@ -17,7 +17,10 @@
../../services/transmission.nix
];
- foundation.monitoring.client.enable = true;
+ foundation.monitoring = {
+ client.enable = true;
+ services = [ "base" "jellyfin" "immich" ];
+ };
system.stateVersion = "24.05";
}
diff --git a/machines/lapin/default.nix b/machines/lapin/default.nix
index 4cdb9c5..f08b644 100644
--- a/machines/lapin/default.nix
+++ b/machines/lapin/default.nix
@@ -14,7 +14,10 @@
../../services/akkoma
];
- foundation.monitoring.client.enable = true;
+ foundation.monitoring = {
+ client.enable = true;
+ services = [ "base" "akkoma" "pds" "conduwuit" ];
+ };
age.secrets.cloudflare-dns = {
file = ../../secrets/cloudflare-dns.age;
@@ -39,6 +42,10 @@
proxyWebsockets = true;
proxyPass = "http://127.0.0.1:1111";
};
+
+ extraConfig = ''
+ access_log /var/log/nginx/akkoma.access.log json_combined;
+ '';
};
"pds.rnrd.eu" = {
@@ -50,6 +57,10 @@
proxyWebsockets = true;
proxyPass = "http://127.0.0.1:16419";
};
+
+ extraConfig = ''
+ access_log /var/log/nginx/pds.access.log json_combined;
+ '';
};
};
diff --git a/machines/renard/default.nix b/machines/renard/default.nix
index 7a23fa9..d443886 100644
--- a/machines/renard/default.nix
+++ b/machines/renard/default.nix
@@ -18,11 +18,15 @@
../../services/irc
];
- foundation.monitoring.server = {
- enable = true;
- hosts = map (m: {
- inherit (m) name; inherit (m.tailscale) ip;
- }) machines;
+ foundation.monitoring = {
+ server = {
+ enable = true;
+ hosts = map (m: {
+ inherit (m) name; inherit (m.tailscale) ip;
+ }) machines;
+ };
+
+ services = [ "base" "tailnet" "git" "mel" "shorest" ];
};
systemd.services."acme-${me.tailscale.domain}" =
@@ -95,7 +99,7 @@
"rnrd.eu".locations = {
# redirect to akkoma on lapin
"/.well-known/webfinger" = {
- return = "301 https://soc.rnrd.eu$request_uri";
+ return = "301 https://soc.rnrd.eu$request_uri";
};
# delegate matrix to lapin
@@ -131,6 +135,9 @@
listenAddresses = [ me.tailscale.ip ];
# point to the default page, for now!
locations."/" = { alias = "/var/www/html/"; };
+ extraConfig = ''
+ access_log /var/log/nginx/tailnet.access.log json_combined;
+ '';
};
"sho.rest" = {
@@ -139,12 +146,18 @@
locations."/" = {
proxyPass = "http://127.0.0.1:5000";
};
+ extraConfig = ''
+ access_log /var/log/nginx/shorest.access.log json_combined;
+ '';
};
"mel.gg" = {
enableACME = true;
forceSSL = true;
root = "/srv/mel";
+ extraConfig = ''
+ access_log /var/log/nginx/mel.access.log json_combined;
+ '';
};
"git.rnrd.eu" = {
@@ -159,6 +172,9 @@
alias = "/srv/cgit/static/";
};
};
+ extraConfig = ''
+ access_log /var/log/nginx/git.access.log json_combined;
+ '';
};
};
diff --git a/modules/jellyfin.nix b/modules/jellyfin.nix
index ae6388b..6494fc6 100644
--- a/modules/jellyfin.nix
+++ b/modules/jellyfin.nix
@@ -14,6 +14,9 @@
locations."/" = {
proxyPass = "http://127.0.0.1:8096";
};
+ extraConfig = ''
+ access_log /var/log/nginx/jellyfin.access.log json_combined;
+ '';
};
};
diff --git a/modules/www.nix b/modules/www.nix
index c50019a..7ce880b 100644
--- a/modules/www.nix
+++ b/modules/www.nix
@@ -47,6 +47,9 @@ in
root = "/var/www/html";
forceSSL = true;
enableACME = true;
+ extraConfig = ''
+ access_log /var/log/nginx/base.access.log json_combined;
+ '';
};
};
};
diff --git a/services/conduwuit.nix b/services/conduwuit.nix
index af59f7f..5935219 100644
--- a/services/conduwuit.nix
+++ b/services/conduwuit.nix
@@ -62,6 +62,8 @@ in
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
+
+ access_log /var/log/nginx/conduwuit.access.log json_combined;
'';
};
};
diff --git a/services/immich.nix b/services/immich.nix
index 1217593..b1a6a6f 100644
--- a/services/immich.nix
+++ b/services/immich.nix
@@ -110,6 +110,8 @@ in
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
+
+ access_log /var/log/nginx/immich.access.log json_combined;
'';
};
};