Properly define anySsl

This commit is contained in:
Danila Fedorin 2021-10-22 23:12:30 -07:00
parent 423547a0c5
commit adb0a9e935

View File

@ -3,7 +3,7 @@ with lib;
let
cfg = config.services.danilafe-blog;
sslForDomain = domain: (cfg.ssl == true) || (cfg.ssl."${domain}" or false);
anySsl = any (mapAttrsToList (domain: pkg: sslForDomain domain) cfg.domains);
anySsl = any sslForDomain (attrNames cfg.domains);
virtualHost = domain: package:
{
virtualHosts."${domain}" = mkMerge [
@ -38,6 +38,7 @@ in
};
domains = mkOption {
type = types.attrsOf types.package;
default = {};
description = "Attribute set where keys are domains and values are packages to host there.";
};
challengePath = mkOption {