freaky nix scripting
This commit is contained in:
@@ -183,8 +183,9 @@ EOF
|
|||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts.${opts.default-nginx.hostname} = {
|
virtualHosts.${opts.default-nginx.hostname} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
# Parse TLD from hostname to use wildcard cert
|
# Parse TLD from hostname to use wildcard cert (just takes last two elements separated by a period)
|
||||||
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}";
|
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
|
# This does not work even with the MINIO_BROWSER_REDIRECT_URL set
|
||||||
locations."/console" = {
|
locations."/console" = {
|
||||||
|
|||||||
@@ -78,6 +78,8 @@
|
|||||||
virtualHosts."roypository.com" = {
|
virtualHosts."roypository.com" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "roypository.com";
|
useACMEHost = "roypository.com";
|
||||||
|
|
||||||
|
locations = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts."nimh.roypository.com" = {
|
virtualHosts."nimh.roypository.com" = {
|
||||||
|
|||||||
Reference in New Issue
Block a user