1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/systems/makanek/names.nix

34 lines
833 B
Nix
Raw Normal View History

2021-10-12 22:03:29 +02:00
{ pkgs, lib, ... }:
let
port = 5703;
2022-01-04 22:00:57 +01:00
geogen-src = "${<scripts>}/onomastics";
geogen = pkgs.callPackage geogen-src {};
2021-10-12 22:03:29 +02:00
in
{
systemd.services.names = {
wants = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
description = "Better clone of geogen.stoepel.net";
serviceConfig = {
DynamicUser = true;
};
script = ''
cd $(mktemp -d)
2022-01-04 22:00:57 +01:00
ln -s "${geogen-src}/wsgi.py" wsgi.py
2021-12-31 16:57:45 +01:00
${geogen.dependencyEnv}/bin/gunicorn wsgi:app -b :${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}";
};
}