Properly define anySsl
This commit is contained in:
parent
423547a0c5
commit
adb0a9e935
|
@ -3,7 +3,7 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.danilafe-blog;
|
cfg = config.services.danilafe-blog;
|
||||||
sslForDomain = domain: (cfg.ssl == true) || (cfg.ssl."${domain}" or false);
|
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:
|
virtualHost = domain: package:
|
||||||
{
|
{
|
||||||
virtualHosts."${domain}" = mkMerge [
|
virtualHosts."${domain}" = mkMerge [
|
||||||
|
@ -38,6 +38,7 @@ in
|
||||||
};
|
};
|
||||||
domains = mkOption {
|
domains = mkOption {
|
||||||
type = types.attrsOf types.package;
|
type = types.attrsOf types.package;
|
||||||
|
default = {};
|
||||||
description = "Attribute set where keys are domains and values are packages to host there.";
|
description = "Attribute set where keys are domains and values are packages to host there.";
|
||||||
};
|
};
|
||||||
challengePath = mkOption {
|
challengePath = mkOption {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user