This commit is contained in:
Joakim Repomaa
2025-02-08 19:44:52 +02:00
parent 271d9e8f88
commit 913d3d1238
32 changed files with 844 additions and 544 deletions

View File

@@ -0,0 +1,26 @@
{ lib, config, ... }:
let
cfg = config.modules.services.gtrackmap;
fqdn = "${cfg.subdomain}.${config.networking.domain}";
in
{
options.modules.services.gtrackmap = {
enable = lib.mkEnableOption "Enable GTrackmap";
subdomain = lib.mkOption {
type = lib.types.str;
};
port = lib.mkOption {
type = lib.types.int;
default = 3200;
};
};
config = {
services.gtrackmap = {
enable = true;
inherit (cfg) port;
};
modules.services.webserver.vHosts.${fqdn}.locations."/".proxyPort = cfg.port;
};
}