Use config to declare port

This commit is contained in:
♥ Minnie ♥ 2024-06-06 20:37:23 +08:00
parent 5e3f774b80
commit 19d5a9ca82
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:
{
services.forgejo = {
@ -33,7 +33,7 @@
services.traefik.dynamicConfigOptions.http.services = {
forgejo.loadBalancer.servers = [
{ url = "http://127.0.0.1:3131"; }
{ url = "http://127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}"; }
];
};
}

View file

@ -1,4 +1,4 @@
{ inputs, pkgs, lib, ... }:
{ inputs, pkgs, lib, config, ... }:
let
modpack = pkgs.fetchPackwizModpack rec {
version = "c9087bf";
@ -90,7 +90,7 @@ in
services.traefik.dynamicConfigOptions.http.services = {
minecraft.loadBalancer.servers = [
{ url = "http://127.0.0.1:25565"; }
{ url = "http://127.0.0.1:${toString config.services.minecraft-servers.servers.kanto.serverProperties.server-port}"; }
];
};
}