mirror of
https://github.com/AsgardEternal/Squad.nix.git
synced 2025-01-02 15:39:29 -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.
|
||||
# A fair bit of the handling of the nested servers was based upon the code there.
|
||||
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;
|
||||
collectPorts = portType: lib.lists.flatten (lib.mapAttrsToList (_: serverConfig: serverConfig.${portType}) enabledServers);
|
||||
gamePorts = collectPorts "gamePort";
|
||||
|
Loading…
Reference in New Issue
Block a user