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
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
];See options.md for all available options
{
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;
};
};
};
}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
'';
};
}- FeralInteractive/gamemode#177 for the idea
- https://github.com/TeamSpen210/srctools for their library