diff --git a/homelab-services/minio-service/flake.nix b/homelab-services/minio-service/flake.nix index b6de407..9a773cb 100755 --- a/homelab-services/minio-service/flake.nix +++ b/homelab-services/minio-service/flake.nix @@ -183,8 +183,9 @@ EOF enable = true; virtualHosts.${opts.default-nginx.hostname} = { forceSSL = true; - # Parse TLD from hostname to use wildcard cert - useACMEHost = (domain: let parts = lib.strings.split "." domain; len = builtins.length parts; in if len>=2 then lib.strings.concatStringsSep "." (lib.lists.drop (len - 2) parts) else domain) "${opts.default-nginx.hostname}"; + # Parse TLD from hostname to use wildcard cert (just takes last two elements separated by a period) + useACMEHost = let b = builtins; s = lib.strings; fl = s.splitString "." "${opts.default-nginx.hostname}"; + in b.concatStringsSep "." [ (b.elemAt fl (b.length fl - 2)) (b.elemAt fl (b.length fl - 1)) ]; # This does not work even with the MINIO_BROWSER_REDIRECT_URL set locations."/console" = { diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9d4a07a..f5b12d1 100755 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -78,6 +78,8 @@ virtualHosts."roypository.com" = { forceSSL = true; useACMEHost = "roypository.com"; + + locations = { }; }; virtualHosts."nimh.roypository.com" = {