2021-07-27 21:42:48 +02:00
|
|
|
# Nixcitizen
|
|
|
|
A [Star Citizen](https://robertsspaceindustries.com/star-citizen) runtime environment managed by nix.
|
|
|
|
|
|
|
|
## Idea
|
2021-07-22 00:05:52 +02:00
|
|
|
Nixcitizen is an attempt to package a wine application in a sensible and
|
|
|
|
practical way with nix. The idea that the `WINEPREFIX` is handled by a
|
|
|
|
script that lives inside the nix store which derives the `WINEPREFIX` from
|
|
|
|
it's own path inside the store, leading to a creation and setup of a new
|
|
|
|
`WINEPREFIX` as soon as the script, it's dependencies or any configuration
|
|
|
|
changes.
|
|
|
|
|
|
|
|
The volatile nature of the `WINEPREFIX` leads to challenges in regards
|
|
|
|
to preservation of needed state, this is handled in the following ways:
|
|
|
|
|
2021-07-22 00:10:38 +02:00
|
|
|
* The Application in itself and the launcher folder containing the
|
2021-07-22 00:05:52 +02:00
|
|
|
session data are created in the users home directory and symlinked
|
|
|
|
into each prefix.
|
|
|
|
* Internal wine settings are handled as registry files and automatically
|
|
|
|
applied when a new prefix is created.
|
|
|
|
|
|
|
|
All dependencies are handled by wine. [dxvk](https://github.com/doitsujin/dxvk)
|
|
|
|
is compiled with nix and copied into each prefix and fonts are handled in a
|
|
|
|
similar manner
|
|
|
|
|
2021-07-27 21:42:48 +02:00
|
|
|
## Installation
|
2021-07-22 00:05:52 +02:00
|
|
|
First clone this repository, then
|
|
|
|
|
2021-07-27 21:42:48 +02:00
|
|
|
### On nixos
|
2021-07-22 00:05:52 +02:00
|
|
|
* Put `(pkgs.callPackage ./path/to/repo { })` into `environment.systemPackages` or
|
|
|
|
`users.extraUsers.<name>.packages` or into your home-manager configuration packages
|
|
|
|
|
2021-07-27 21:42:48 +02:00
|
|
|
### with nix-build
|
2021-07-27 22:38:23 +02:00
|
|
|
* `nix-build -E 'with import <nixpkgs> {}; pkgs.callPackage ./default.nix { }'`
|
2021-07-22 00:05:52 +02:00
|
|
|
|
|
|
|
|
2021-07-27 21:42:48 +02:00
|
|
|
### Installation parameters
|
2021-07-22 00:05:52 +02:00
|
|
|
* `installDir`: Contains the `Roberts Space Industries` folder that is being linked
|
|
|
|
into the `Program Files` folder of the prefixs.
|
|
|
|
* `launcherCache`: `AppData` folder of the launcher. Holds the session data.
|
|
|
|
* `prefixBaseDir`: Where all the prefixes are installed under.
|
|
|
|
* `binName`: Name of the generated executable.
|
|
|
|
* `launcherArgs`: Arguments the RSI Launcher is called with.
|
2021-07-27 20:56:30 +02:00
|
|
|
* `vulkanDrivers`: Force list of vulkan drivers. Supported Elements: `radeon`, `intel` and `amdvlk`
|
2021-07-27 21:42:48 +02:00
|
|
|
might solve issues with mesa version conflicts mainly on non-nixos platforms. Nvidia drivers not
|
|
|
|
(yet?) supported for this option.
|
2021-07-22 00:05:52 +02:00
|
|
|
* `winePackage`: Package of wine to use.
|
2021-07-26 21:59:28 +02:00
|
|
|
* `wineSrc`: Points to the source to build wine from.
|
2021-07-22 00:05:52 +02:00
|
|
|
* `wineGlobalEnv`: Global variables that are exported at script startup.
|
|
|
|
* `winePatches`: List of patches for wine for easier access.
|
2021-07-26 21:59:28 +02:00
|
|
|
* `applyReccomendedWinePatches`: Whether or not to apply patches to wine for star citizen.
|
2021-07-22 00:05:52 +02:00
|
|
|
* `virtualDesktop`: `NULL` or a string in the form `AxB` with `A` and `B` being
|
|
|
|
positive Integers that define the height and width of the wine virtual desktop.
|
|
|
|
* `registryFiles`: Additional registry files to add to each prefix.
|
|
|
|
* `captureMouse`: Whether wine captures fullscreen windows.
|
2021-07-26 21:59:28 +02:00
|
|
|
* `enableGameScope`: Whether or not to run the game in [gamescope](https://github.com/Plagman/gamescope).
|
|
|
|
* `gameScopeArgs`: [options](https://github.com/Plagman/gamescope#options) for gamescope.
|
2021-07-22 00:05:52 +02:00
|
|
|
|
2021-07-27 21:42:48 +02:00
|
|
|
### Script parameters
|
2021-07-22 00:05:52 +02:00
|
|
|
* `--install-prefix`: Installs the prefix if needed.
|
|
|
|
* `--install-launcher`: Installs the launcher. Can be used to reinstall.
|
|
|
|
* `--clean`: Deletes all but the currently used prefixes of the game.
|
|
|
|
* `--remove-prefix`: Deletes the currently used prefix. Use with care.
|
|
|
|
* `--run-game`: Runs the game (after installing the prefix if needed). Default behaviour.
|
|
|
|
* `--print-prefix`: Prints the current prefix path.
|
|
|
|
* `--help`: Prints help text.
|
|
|
|
* `--wine`: Runs a wine executable inside the context of the script. Example:
|
|
|
|
`starcitizen --wine winecfg`
|
|
|
|
|
2021-07-27 22:33:48 +02:00
|
|
|
## Issues/Contact
|
|
|
|
Currently this instance of gitea is closed for the public. Discussion and bugreports are welcome
|
|
|
|
in the matrix room [#nixcitizen:xndr.de](matrix://#nixcitizen:xndr.de).
|
|
|
|
|
2021-07-27 21:42:48 +02:00
|
|
|
## Disclaimer
|
2021-07-22 00:10:38 +02:00
|
|
|
This repository does not host any copyrighted content. All content is fetched
|
2021-07-22 00:05:52 +02:00
|
|
|
from official sources and is never redistributed by the author of this
|
|
|
|
software. It does not help in any way to cheat or pirate the game. A normal
|
|
|
|
account is still needed to install or play the game.
|