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/"; }; }