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
star-citizen-helper Star Citizen helper utility, clears shaders if an update is detected
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.

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):

WINEPREFIX=$HOME/Games/star-citizen nix run github:fufexan/nix-gaming#wine-ge -- winecfg

Credits

About

Nix configuration for StarCitizen, optionally installs the game package.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published