From d0793fb1256d32607005479f8f8ea7588a6bc41e Mon Sep 17 00:00:00 2001 From: William Date: Fri, 17 Oct 2025 11:07:55 -0300 Subject: [PATCH] I'm forced to map a port in librespeed --- hosts/alexandria/librespeed.nix | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/hosts/alexandria/librespeed.nix b/hosts/alexandria/librespeed.nix index aeb8db3..e36a81d 100644 --- a/hosts/alexandria/librespeed.nix +++ b/hosts/alexandria/librespeed.nix @@ -11,27 +11,12 @@ let in { - systemd.services.init-librespeed-network = { - description = "Create the network bridge for librespeed."; - after = [ "network.target" ]; - wantedBy = [ "podman-librespeed.service" ]; - serviceConfig.Type = "oneshot"; - script = '' - check=$(${config.virtualisation.podman.package}/bin/podman network ls | grep "librespeed" || true) - if [ -z "$check" ]; then - ${config.virtualisation.podman.package}/bin/podman network create librespeed - else - echo "librespeed network already exists" - fi - ''; - }; - virtualisation.oci-containers.containers."librespeed" = { image = "lscr.io/linuxserver/librespeed:latest"; environment = { TZ = "America/Bahia"; }; - networks = [ "librespeed" ]; + ports = [ "127.0.0.1:58080:80" ]; extraOptions = [ "--pull=newer" "--label=io.containers.autoupdate=registry" @@ -40,6 +25,6 @@ in services.nginx.virtualHosts = mkNginxVHosts { acmeHost = "baduhai.dev"; - domains."speedtest.baduhai.dev".locations."/".proxyPass = "http://librespeed:80/"; + domains."speedtest.baduhai.dev".locations."/".proxyPass = "http://127.0.0.1:58080/"; }; }