{ pkgs, lib, config, ... }: let inherit (config) networking; inherit (config.services) nginx; domain = "sourcephile.fr"; in { services.nginx = { virtualHosts."www" = { serverName = "www.${networking.domain}"; serverAliases = [ networking.domain ] ++ config.networking.domainAliases ++ map (domainAlias: "www." + domainAlias) config.networking.domainAliases; forceSSL = false; enableSSL = true; useACMEHost = domain; globalRedirect = "git.${networking.domain}"; }; }; }