From 9fee121a565190bdc41025acd08b6af01c66be86 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 25 May 2025 03:34:51 +0200 Subject: [PATCH 1/4] fix: comply with new nixos namings --- modules/services/grafana.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/services/grafana.nix b/modules/services/grafana.nix index a4dfb68..e55d70c 100644 --- a/modules/services/grafana.nix +++ b/modules/services/grafana.nix @@ -10,12 +10,12 @@ }; }; - nginx.virtualHosts.${config.services.grafana.domain} = { + nginx.virtualHosts.${config.services.grafana.settings.server.domain} = { forceSSL = true; sslCertificate = "/var/lib/acme/liv.town/cert.pem"; sslCertificateKey = "/var/lib/acme/liv.town/key.pem"; locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}"; + proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}"; proxyWebsockets = true; }; }; From d70b62cd649ff34f835d12f3559c552f39abec96 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 25 May 2025 03:42:58 +0200 Subject: [PATCH 2/4] chore: make list of services for violet a little less messy --- modules/services/violet.nix | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/modules/services/violet.nix b/modules/services/violet.nix index 56e02c7..85b483d 100644 --- a/modules/services/violet.nix +++ b/modules/services/violet.nix @@ -2,24 +2,25 @@ { imports = [ (import ./invidious.nix) ] + ++ [ (import ./anubis.nix) ] + ++ [ (import ./binternet-proxy.nix) ] + ++ [ (import ./docker.nix) ] + ++ [ (import ./frp.nix) ] + ++ [ (import ./forgejo.nix) ] + ++ [ (import ./grafana.nix) ] + ++ [ (import ./gokapi.nix) ] + ++ [ (import ./jellyfin.nix) ] + ++ [ (import ./librey-proxy.nix) ] + ++ [ (import ./lidarr.nix) ] + ++ [ (import ./matrix/default.nix) ] ++ [ (import ./mumble.nix) ] + ++ [ (import ./monitoring.nix) ] ++ [ (import ./ntfy.nix) ] ++ [ (import ./sharkey-proxy.nix) ] - ++ [ (import ./librey-proxy.nix) ] - ++ [ (import ./binternet-proxy.nix) ] - ++ [ (import ./grafana.nix) ] - ++ [ (import ./monitoring.nix) ] - ++ [ (import ./docker.nix) ] - ++ [ (import ./gokapi.nix) ] ++ [ (import ./nginx.nix) ] # ++ [(import ./komga.nix)] - ++ [ (import ./frp.nix) ] ++ [ (import ./radicale.nix) ] - ++ [ (import ./jellyfin.nix) ] - ++ [ (import ./readarr.nix) ] - ++ [ (import ./lidarr.nix) ] - # ++ [(import ./smart-monitoring.nix)] - # ++ [(import ./jitsi-meet.nix)] - ++ [ (import ./forgejo.nix) ] - ++ [ (import ./matrix/default.nix) ]; + ++ [ (import ./readarr.nix) ]; + # ++ [(import ./smart-monitoring.nix)] + # ++ [(import ./jitsi-meet.nix)] } From a82653ca9dcdea0217b332c9a1d939d5083cb82e Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 25 May 2025 03:46:58 +0200 Subject: [PATCH 3/4] feat: adds anubis --- modules/services/anubis.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 modules/services/anubis.nix diff --git a/modules/services/anubis.nix b/modules/services/anubis.nix new file mode 100644 index 0000000..f906920 --- /dev/null +++ b/modules/services/anubis.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: +{ + users.users.nginx.extraGroups = [ config.users.groups.anubis.name ]; + services.anubis = { + defaultOptions = { + enable = true; + settings = { + SERVE_ROBOTS_TXT = true; + }; + }; + }; +} From 23e4113ed9d0e612b3dc8326b0c9b154f5522b34 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 25 May 2025 03:57:41 +0200 Subject: [PATCH 4/4] feat: adds anubis to $SERVICE --- modules/services/binternet-proxy.nix | 11 +++++++++-- modules/services/librey-proxy.nix | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/modules/services/binternet-proxy.nix b/modules/services/binternet-proxy.nix index e1ffe1f..4191e01 100644 --- a/modules/services/binternet-proxy.nix +++ b/modules/services/binternet-proxy.nix @@ -1,12 +1,19 @@ -{ ... }: +{ config, ... }: { services = { + anubis.instances.binternet = { + settings = { + TARGET = "http://localhost:8081"; + BIND = ":8082"; + BIND_NETWORK = "tcp"; + }; + }; nginx.virtualHosts."curate.liv.town" = { forceSSL = true; sslCertificate = "/var/lib/acme/liv.town/cert.pem"; sslCertificateKey = "/var/lib/acme/liv.town/key.pem"; locations."/" = { - proxyPass = "http://localhost:8081"; + proxyPass = "http://localhost${toString config.services.anubis.instances.binternet.settings.BIND}"; proxyWebsockets = true; }; }; diff --git a/modules/services/librey-proxy.nix b/modules/services/librey-proxy.nix index 92da713..2bd3e7d 100644 --- a/modules/services/librey-proxy.nix +++ b/modules/services/librey-proxy.nix @@ -1,12 +1,19 @@ -{ ... }: +{ config, ... }: { services = { + anubis.instances.librey = { + settings = { + TARGET = "http://localhost:8080"; + BIND = ":8079"; + BIND_NETWORK = "tcp"; + }; + }; nginx.virtualHosts."search.liv.town" = { forceSSL = true; sslCertificate = "/var/lib/acme/liv.town/cert.pem"; sslCertificateKey = "/var/lib/acme/liv.town/key.pem"; locations."/" = { - proxyPass = "http://localhost:8080"; + proxyPass = "http://localhost${toString config.services.anubis.instances.librey.settings.BIND}"; proxyWebsockets = true; }; };