mirror of
https://github.com/AsgardEternal/Squad.nix.git
synced 2025-01-04 21:19:27 -06:00
refactor: prepend squad
in mkServerName
This commit is contained in:
parent
268af657c3
commit
fa51273b80
@ -773,7 +773,7 @@ in
|
|||||||
# Credit to https://github.com/mkaito/nixos-modded-minecraft-servers/tree/master.
|
# Credit to https://github.com/mkaito/nixos-modded-minecraft-servers/tree/master.
|
||||||
# A fair bit of the handling of the nested servers was based upon the code there.
|
# A fair bit of the handling of the nested servers was based upon the code there.
|
||||||
enabledServers = lib.filterAttrs (_: conf: conf.enable) cfg.servers;
|
enabledServers = lib.filterAttrs (_: conf: conf.enable) cfg.servers;
|
||||||
mkServerName = name: replaceNonAlum "-" name;
|
mkServerName = name: "squad-${replaceNonAlum "-" name}";
|
||||||
eachEnabledServer = f: lib.mapAttrs' (name: config: lib.nameValuePair (mkServerName name) (f name config)) enabledServers;
|
eachEnabledServer = f: lib.mapAttrs' (name: config: lib.nameValuePair (mkServerName name) (f name config)) enabledServers;
|
||||||
collectPorts = portType: lib.lists.flatten (lib.mapAttrsToList (_: serverConfig: serverConfig.${portType}) enabledServers);
|
collectPorts = portType: lib.lists.flatten (lib.mapAttrsToList (_: serverConfig: serverConfig.${portType}) enabledServers);
|
||||||
gamePorts = collectPorts "gamePort";
|
gamePorts = collectPorts "gamePort";
|
||||||
|
Loading…
Reference in New Issue
Block a user