2022-03-10 21:52:12 +01:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
2023-02-22 10:02:55 +01:00
|
|
|
inputs,
|
2022-03-10 21:52:12 +01:00
|
|
|
...
|
|
|
|
|
}: let
|
2021-10-12 22:03:29 +02:00
|
|
|
port = 5703;
|
2023-02-22 10:02:55 +01:00
|
|
|
onomap-src = inputs.scripts.outPath + "/onomastics-ng";
|
2022-04-19 23:28:00 +02:00
|
|
|
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";
|
2022-05-02 13:28:57 +02:00
|
|
|
Restart = "on-failure";
|
|
|
|
|
RestartSec = "15s";
|
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;
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-22 11:47:59 +02:00
|
|
|
niveum.passport.services = [
|
|
|
|
|
{
|
|
|
|
|
link = "http://names.kmein.r";
|
|
|
|
|
title = "Onomap";
|
|
|
|
|
description = "maps surnames within Germany.";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
2021-10-12 22:03:29 +02:00
|
|
|
services.nginx.virtualHosts."names.kmein.r" = {
|
|
|
|
|
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
|
|
|
|
};
|
|
|
|
|
}
|