Module: home/modules/gaming.nix
Purpose: Optimized Steam installation for drone simulation and gaming
Date: December 15, 2025
- ✅ Steam client with FHS compatibility
- ✅ Proton GE for better Windows game compatibility
- ✅ steam-run for non-Steam games
- ✅ Protontricks for Proton prefix management
- ✅ Gamemode - Automatic CPU/GPU optimization when gaming
- ✅ MangoHud - FPS and performance overlay
- ✅ DXVK async - Faster shader compilation
- ✅ Shader caching - Pre-compiled shaders for faster loading
- ✅ NVIDIA power mode - Maximum performance during games
- ✅ NVIDIA GPU optimizations (for your setup)
- ✅ Gamepad/controller support (for drone controllers)
- ✅ Vulkan rendering - Better performance than OpenGL
# home/home.nix
programs.gaming = {
enable = true; # Enables everything with sane defaults
# Optional: Customize
performance.mangohud = true; # FPS overlay
performance.gamemode = true; # CPU/GPU boost
hardware.nvidia = true; # NVIDIA optimizations
hardware.gamepad = true; # Controller support
};cd ~/git/home
home-manager switch --flake .steam # Launches with optimizations
steam-big # Big Picture mode
steam-fps # With MangoHud FPS overlay
steam-debug # With debug logginggamemode-statussteam-run ./your-gameWhat it does: Automatically applies CPU/GPU optimizations when gaming
Features:
- Sets CPU governor to "performance"
- Increases process priority (nice level -10)
- Sets realtime I/O scheduling
- NVIDIA: Forces maximum performance mode
- KDE: Optionally disables compositor (set
disableCompositor = true)
How it works: Gamemode detects when a game starts and automatically:
- Boosts CPU frequency
- Increases GPU power limit
- Prioritizes game I/O
- Returns to normal when game closes
What it does: Displays FPS and performance metrics in-game
Toggle: Press Shift+F12 to show/hide
FPS limit: Press Shift+F1 to cycle FPS limits (60/120/144/165/240)
Displays:
- FPS (frames per second)
- Frame timing graph
- GPU temperature, power, clock speeds
- CPU temperature, power, usage
- RAM/VRAM usage
Configuration: ~/.config/MangoHud/MangoHud.conf
What it does: Pre-compiles shaders to avoid stuttering
Benefits:
- Eliminates shader compilation stutter
- Faster game loading
- Smoother gameplay
Cache location: ~/.local/share/Steam/steamapps/shadercache/
Environment variables (set automatically):
__GL_THREADED_OPTIMIZATIONS=1- Multi-threaded driver__GL_SYNC_TO_VBLANK=0- Disable vsync (control in-game)PROTON_ENABLE_NVAPI=1- NVIDIA-specific features__GL_SHADER_DISK_CACHE=1- Persistent shader cache
Gamemode actions:
- Sets GPU power limit to maximum
- Forces performance mode (P0 state)
- Returns to adaptive mode when done
What it does: Translates DirectX 9/10/11 to Vulkan
Optimizations:
- Async shader compilation (no stutter)
- Multi-threaded compilation
- Reduced frame latency
- Memory optimizations
Configuration: ~/.config/dxvk.conf
Many drone simulators are available on Steam:
- Liftoff - Professional FPV racing simulator
- DCL - The Game - Drone Champions League simulator
- Uncrashed - FPV freestyle simulator
- Velocidrone - FPV racing simulator
- DRL Simulator - Drone Racing League official sim
- FPV Freerider - Beginner-friendly trainer
The module includes antimicrox for mapping game controllers to keyboard/mouse:
antimicrox # GUI for controller mappingSteam Input: Also supports Steam's built-in controller configurator (Settings → Controller)
For smooth drone simulation (60+ FPS):
-
Enable all optimizations:
programs.gaming.performance.gamemode = true; programs.gaming.performance.mangohud = true;
-
Monitor FPS with MangoHud: Press
Shift+F12in-game -
Adjust graphics settings: Start with medium, increase if >60 FPS
-
Use Vulkan renderer: Most modern simulators support it (better performance)
programs.gaming.steam.extraCompatPackages = [
pkgs.proton-ge-bin # Default
# Add more versions if needed
];programs.gaming.optimizations.disableCompositor = true;Warning: Desktop will be unresponsive during games. Only enable if you need every last FPS.
programs.gaming.performance.cpuGovernor = "schedutil"; # or "ondemand", "powersave"programs.gaming.steam.extraLibraries = with pkgs; [
# Add 32-bit libraries if games fail to launch
];# Check logs
steam-debug
# Run with strace
strace steam
# Check Proton version
# Right-click game → Properties → Compatibility → Force Proton version# Check if gamemode is active
gamemode-status
# Monitor FPS and temps
steam-fps
# Check GPU usage
nvidia-smi dmon# Test controller
jstest-gtk
# Check Steam Input settings
# Steam → Settings → Controller → Test Device# NVIDIA users (system-level, requires sudo)
sudo zypper install libGL1-32bit~/.local/bin/steam-optimized- Launch script~/.config/MangoHud/MangoHud.conf- FPS overlay config~/.config/gamemode.ini- Performance optimizer config~/.config/dxvk.conf- DirectX translator config
Before (no optimizations):
- Variable CPU frequency (power saving)
- GPU in adaptive mode
- Shader compilation stutter
- No FPS monitoring
After (with gamemode):
- Max CPU frequency (+20-40% performance)
- GPU in performance mode (+10-20% FPS)
- Pre-compiled shaders (no stutter)
- Real-time performance monitoring
Expected improvement: 20-50% higher FPS, smoother gameplay
Minimum:
- NVIDIA GPU (GeForce GTX 900 series or newer)
- 8GB RAM
- 20GB free disk space (for games + shader cache)
Recommended (your workstation):
- NVIDIA GPU with 8GB+ VRAM ✅
- 32GB+ RAM ✅
- SSD for Steam library ✅
- 130GB RAM = perfect for large game installs ✅
- Enable the module: Add to
home/home.nix - Apply changes:
home-manager switch --flake ~/git/home - Install Steam: Already included, just run
steam - Install drone simulator: Search Steam for "drone" or "FPV"
- Configure controller: Steam → Settings → Controller
- Start training: Launch game, press
Shift+F12to monitor FPS
- Arch Wiki: Steam
- Nixpkgs Steam docs
- Gamemode GitHub
- MangoHud GitHub
- ProtonDB - Game compatibility
- DXVK GitHub
Ready to fly! 🚁