server and other shit

This commit is contained in:
martyTF 2026-04-11 17:21:28 +02:00
parent 270e1a0be4
commit 804371bf96
65 changed files with 1428 additions and 619 deletions

View file

@ -0,0 +1,54 @@
{
config,
lib,
pkgs,
...
}:
{
options = {
server.misc.lauti = {
enable = lib.mkEnableOption "enable lauti";
port = lib.mkOption {
default = 3333;
description = "lauti port";
};
public = lib.mkEnableOption "make lauti public";
subdomain = lib.mkOption {
default = "lauti";
description = "lauti subdomain";
};
};
};
config = {
services = {
lauti = {
enable = config.server.misc.lauti.enable;
settings = {
LAUTI_ADMIN_EMAIL = "lauti@${config.networking.domain}";
LAUTI_BASE_URL = "https://${config.server.misc.lauti.subdomain}.${config.networking.domain}";
LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/lauti/osm";
LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
LAUTI_TIMEZONE = "Europe/Berlin";
LAUTI_LANGUAGE = config.console.keyMap;
};
secrets = [ /home/${config.user.userName}/secrets/lauti ];
};
nginx = {
virtualHosts = {
"${config.server.misc.lauti.subdomain}.${config.networking.domain}" =
if config.server.misc.lauti.public then
{
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.server.misc.lauti.port}";
};
}
else
{ };
};
};
};
};
}