Skip to content

Nix configuration for StarCitizen, optionally installs the game package.

License

Notifications You must be signed in to change notification settings

LovingMelody/nix-citizen

Repository files navigation

nix-citizen - A Star Citizen helper flake

Helper Flake Logo

Install & Run

Recommended to setup cache if you are using the star-citizen package. Instructions can be found upstream at fufexan/nix-gaming.

While it is possible to install this without using nix flakes. I'm not familiar with this and cannot provide assistance. If you would like to learn how to use flakes please see the Nixos & Flakes Book (unoffical)

Whats included in this flake

Package Description
star-citizen Star Citizen game (standalone) This package is repackaged from nix-gaming. This has been modified to use wine-astral
star-citizen-git Same as star-citizen but uses the latest commits for dxvk dxvk-nvapi and vkd3d-proton
star-citizen-umu Same as star-citizen but uses umu-launcher & proton-ge
rsi-launcher RSI Launcher (standalone). App icon & name matches the RSI Launcher. Changes here will eventually make its way to star-citizen
rsi-launcher-git Same as rsi-launcher but uses the latest commits for dxvk dxvk-nvapi and vkd3d-proton
rsi-launcher-umu Same as rsi-launcher but uses umu-launcher & proton-ge
lug-helper Star Citizen's Linux Users Group Helper Script. Includes a setup script if you wish to use lutris instead of the star-citizen package.
wine-astral My Wine build, TKG + Some other patches

Cachix

Build caches are available

# configuration.nix
{
    nix.settings = {
        substituters = ["https://nix-citizen.cachix.org"];
        trusted-public-keys = ["nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo="];
    };
}

Flakes

Add these packages to your home.packages or environment.systemPackages after adding nix-citizen as an input

Optionally, you are able to use the nix-citizen module

# flake.nix
{
    inputs = {
        nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
        home-manager.url = "github:nix-community/home-manager";

        # ...

        nix-citizen.url = "github:LovingMelody/nix-citizen";

        # Optional - updates underlying without waiting for nix-citizen to update
        nix-gaming.url = "github:fufexan/nix-gaming";
        nix-citizen.inputs.nix-gaming.follows = "nix-gaming";
    };

    outputs = {self, nixpkgs, ...}@inputs: {
        # NixOS Setup
        nixosConfigurations.HOST = nixpkgs.lib.nixosSystem {
            specialArgs = {inherit inputs;};

            modules = [
                ./configuration.nix
                # ....
            ];
        };

        # HomeManager...
        homeConfigurations.HOST = inputs.home-manager.lib.homeManagerConfiguration {
            pkgs = import nixpkgs {
                system = "x86_64-linux";
                config.allowUnfree = true;
            };

            extraSpecialArgs = {inherit inputs;};
            modules = [
                ./home.nix
                # ...
             ]
        };
    };
}

Then to add packages....

{pkgs, inputs, ....}: {
    environment.systemPackages = with pkgs; [ #`home.packages` if using home manager
        # replace or repeat for any included package
        inputs.nix-citizen.packages.${system}.star-citizen
    ];

};

Tips

To access the Wine Control Panel (ex. editing Joystick overrides) run the following:

# Adjust WINEPREFIX to your installation directory, otherwise use this default path
WINEPREFIX=$HOME/Games/star-citizen nix run github:fufexan/nix-gaming#wine-ge -- control

Likewise for winecfg (ex. registry edits, some graphics settings):

# If you used the rsi-launcher package the command is rsi-launcher
star-citizen --shell

# You can run your usual wine commands once you enter the shell

Gstreamer errors:

star-citizen --shell

#
# Once you enter the shell:
# wine reg add "HKCU\\Software\\Wine\\MediaFoundation" /v DisableGstByteStreamHandler /t REG_DWORD /d 1 /f
#

Credits

About

Nix configuration for StarCitizen, optionally installs the game package.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 6