Skip to content

different-name/steam-config-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

steam-config-nix

Manage Steam launch options, compat tools and other local config declaratively through your nix config

Warning

This flake is in early development and may be unstable

Please report bugs or request features via the issues tab

Important

Steam must be closed when writing to the Steam config files, either close Steam manually before activating your configuration, or enable programs.steam.config.closeSteam to close Steam on activation

With this option, Steam will not be closed unless a new game is configured or a compatibility tool is changed

Install

Add steam-config-nix to your flake inputs

steam-config-nix = {
  url = "github:different-name/steam-config-nix";
  inputs.nixpkgs.follows = "nixpkgs";
};

steam-config-nix provides both NixOS and Home Manager modules, so pick one depending on your preference

# NixOS
imports = [
  inputs.steam-config-nix.nixosModules.default
];
# Home Manager
imports = [
  inputs.steam-config-nix.homeModules.default
];

Usage

See options.md for all available options

Quickstart example

{
  programs.steam.config = {
    enable = true;
    closeSteam = true;
    defaultCompatTool = "GE-Proton";

    apps = {
      cyberpunk-2077 = {
        id = 1091500;
        compatTool = "GE-Proton";
        launchOptions = {
          env.WINEDLLOVERRIDES = "winmm,version=n,b";
          args = [
            "--launcher-skip"
            "-skipStartScreen"
          ];
        };
      };

      vrchat = {
        id = 438100;
        launchOptions.env.TZ = null;
      };
    };
  };
}

Global Configuration

It is not possible to perform any global configuration of games through Steam configuration

To set environment variables for all Steam games, override extraProfile in the Steam package:

{
  programs.steam.package = pkgs.steam.override {
    extraProfile = ''
      export PROTON_ENABLE_WAYLAND=1
      export PRESSURE_VESSEL_FILESYSTEMS_RW="$XDG_RUNTIME_DIR/wivrn/comp_ipc"
      unset TZ
    '';
  };
}

Acknowledgements

About

Manage Steam launch options and compatibility tools declaratively through Home Manager

Topics

Resources

License

Stars

Watchers

Forks

Contributors