about summary refs log tree commit diff
path: root/modules/services
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-03-15 07:54:13 +0100
committeraszlig <aszlig@redmoonstudios.org>2016-03-15 07:54:13 +0100
commit71d288d53baaabfcbd465fc1251a45ac7699f966 (patch)
tree7b8564e9bec019ffcaff2045afc9e42b270ed67e /modules/services
parent5db0887697b9614b4371b5e52de392fbb953a382 (diff)
modules/starbound: Fix setting serverUsers
Not a big deal because Starbound ignores unknown nodes, but having
something like this in the resulting config file is a bit ugly:

{
  "serverUsers" : {
    "user1" : {
      "_module" : {
        "args" : {
          "name" : "user1"
        },
        "check" : true
      },
      "admin" : false,
      "password" : "passwd1"
    }
  }
}

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/starbound.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/services/starbound.nix b/modules/services/starbound.nix
index e3b84706..fee6751b 100644
--- a/modules/services/starbound.nix
+++ b/modules/services/starbound.nix
@@ -30,7 +30,9 @@ let
     allowAnonymousConnections = cfg.anonymousConnections.allow;
     anonymousConnectionsAreAdmin = cfg.anonymousConnections.adminPrivileges;
 
-    serverUsers = cfg.users;
+    serverUsers = mapAttrs (user: attrs: {
+      inherit (attrs) admin password;
+    }) cfg.users;
 
     inherit (cfg) checkAssetsDigest clearPlayerFiles clearUniverseFiles;
     inherit (cfg) maxPlayers safeScripts serverName;