Starsector

Revision as of 15:43, 6 December 2024 by Makuru (talk | contribs) (Added a page about Starsector and a work around to let the game use more RAM.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Starsector (formerly “Starfarer”) is an open-world single-player space-combat, roleplaying, exploration, and economic game. You take the role of a space captain seeking fortune and glory however you choose.

Installation

Install starsector by adding following into your NixOS config:

  environment.systemPackages = [
    pkgs.starsector
  ];

Tips and tricks

To change the amount of memory, the starsector game can use, add the following command to NixOS.

  (starsector.overrideAttrs ({ ... }: {
    postInstall = ''
      cp ${dotfiles/starsector/settings.json} $out/share/starsector/data/config/settings.json

      substituteInPlace $out/share/starsector/.starsector.sh-wrapped \
        --replace-fail "Xms1536m" "Xms8192m" \
        --replace-fail "Xmx1536m" "Xmx8192m"
    '';
  }))

This commands takes the settings.json and changes the commandline parameters:Xms Xmx to take 8192m or 8GiB of RAM.