2022-03-10 21:52:12 +01:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
2021-10-12 22:03:29 +02:00
|
|
|
port = 5703;
|
2022-04-19 23:28:00 +02:00
|
|
|
onomap-src = "${<scripts>}/onomastics-ng";
|
|
|
|
|
onomap = pkgs.haskellPackages.callCabal2nix "onomap" onomap-src {};
|
2022-03-10 21:52:12 +01:00
|
|
|
in {
|
2021-10-12 22:03:29 +02:00
|
|
|
systemd.services.names = {
|
2022-03-10 21:52:12 +01:00
|
|
|
wants = ["network-online.target"];
|
|
|
|
|
wantedBy = ["multi-user.target"];
|
2021-10-12 22:03:29 +02:00
|
|
|
description = "Better clone of geogen.stoepel.net";
|
|
|
|
|
serviceConfig = {
|
|
|
|
|
DynamicUser = true;
|
2022-04-19 23:28:00 +02:00
|
|
|
ExecStart = "${onomap}/bin/onomap-web";
|
2021-10-12 22:03:29 +02:00
|
|
|
};
|
2022-04-19 23:28:00 +02:00
|
|
|
environment.PORT = toString port;
|
2021-10-12 22:03:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
|
enable = true;
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."names.kmein.r" = {
|
|
|
|
|
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
|
|
|
|
};
|
|
|
|
|
}
|