diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-08-15 18:11:00 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-08-15 18:11:00 +0200 |
commit | da20159356b465c647b8d3ce2a2342e2cea290b0 (patch) | |
tree | 0b62a0b994592f805fa8657333500714278a8996 /modules/services/starbound.nix | |
parent | 375ccbc8e8340021c7f55811b80724da92c438e4 (diff) |
modules/starbound: Fix creation of boot config
The semantics of the boot configuration has changed in version 1.0 and also in the way we package Starbound, so we no longer need to use jq to mix in our values and can specify the entire bootconfig in the service module. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/services/starbound.nix')
-rw-r--r-- | modules/services/starbound.nix | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/modules/services/starbound.nix b/modules/services/starbound.nix index f36593f8..1a5707e4 100644 --- a/modules/services/starbound.nix +++ b/modules/services/starbound.nix @@ -55,18 +55,12 @@ let queryServerPort = cfg.queryServer.port; } // cfg.extraConfig; - bootConfig = pkgs.runCommand "sbboot.config" { - overrides = pkgs.writeText "sbboot.overrides" (builtins.toJSON { - logFileBackups = 0; - modSource = ""; - storageDirectory = cfg.dataDir; - defaultConfiguration = serverConfig; - }); - } '' - "${pkgs.jq}/bin/jq" -s '.[0] * .[1]' \ - "${cfg.package}/etc/sbboot.config" "$overrides" \ - > "$out" - ''; + bootConfig = pkgs.writeText "sbinit.config" (builtins.toJSON { + logFileBackups = 0; + storageDirectory = cfg.dataDir; + assetDirectories = singleton (cfg.package.assets); + defaultConfiguration = serverConfig; + }); # Traverse a given path with ../ until we get to the root directory (/). gotoRoot = p: concatStringsSep "/" (map (const "..") (splitString "/" p)); |