21 lines
412 B
Nix
21 lines
412 B
Nix
{ lib, config, inputs, ... }:
|
|
let
|
|
cfg = config.services.gtrackmap;
|
|
fqdn = "${cfg.subdomain}.${config.networking.domain}";
|
|
in
|
|
{
|
|
imports = [
|
|
inputs.gtrackmap.nixosModules.default
|
|
];
|
|
|
|
options.services.gtrackmap = {
|
|
subdomain = lib.mkOption {
|
|
type = lib.types.str;
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.webserver.vHosts.${fqdn}.locations."/".proxyPort = cfg.port;
|
|
};
|
|
}
|