modules/port-magic: consider hostname in random port generation

This commit is contained in:
Max Headroom 2022-06-18 02:00:07 +02:00
parent 911f7269ac
commit 76b5dddf81

View file

@ -68,7 +68,7 @@ in
};
config = mkIf true {
hostname = mkDefault cfg.ipv4;
port = mkDefault (portHash name);
port = mkDefault (portHash "${cfg.hostname}:${name}");
portStr = toString cfg.port;
tuple = "${cfg.hostname}:${cfg.portStr}";
url = "${cfg.protocol}://${cfg.hostname}:${cfg.portStr}${if cfg.path == null then "" else cfg.path}";