{ homepage, ... }: let domain = "sondell.org"; port = "8118"; in { systemd.services.homepage = { enable = true; description = "homepage with links to selfhosted services"; wantedBy = [ "multi-user.target" ]; unitConfig = { After="network-online.target"; }; serviceConfig = { ExecStart = "${homepage}/bin/home-prod -p ${port}"; User= "sondell"; Type= "simple"; }; }; services.nginx.virtualHosts.${domain} = { forceSSL = true; enableACME = true; locations."/" = { proxyPass = "http://localhost:${port}/"; proxyWebsockets = true; }; }; }