{ config, pkgs, lib, ... }: let mkDomain = subname: "${subname}.${config.networking.fqdn}"; in { _module.args.mkDomain = mkDomain; _module.args.allSubdomains = lib.pipe config.services.nginx.virtualHosts [ #(lib.mapAttrsToList (domain: vhost: [ domain ] ++ vhost.serverAliases)) (lib.mapAttrsToList (domain: vhost: [ domain ])) lib.flatten (lib.sort (x: y: x