Skip to content

vimjoyer/nixos-gaming-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Gaming video

enabling opengpl and GPU drivers

# configuration.nix

{ pkgs, ... }:

{

  hardware.graphics = {
    enable = true;
    enable32Bit = true;
  };
  # hardware.opengl has beed changed to hardware.graphics

  services.xserver.videoDrivers = ["nvidia"];
  # services.xserver.videoDrivers = ["amdgpu"];

  hardware.nvidia.modesetting.enable = true;

}

sync

# configuration.nix

{ pkgs, ... }:

{

  hardware.nvidia.prime = {
    sync.enable = true;

    # integrated
    amdgpuBusId = "PCI:6:0:0"
    # intelBusId = "PCI:0:0:0";

    # dedicated
    nvidiaBusId = "PCI:1:0:0";
  };

}

offload + sync specialization

# configuration.nix

{ pkgs, ... }:

{

  hardware.nvidia.prime = {
    offload = {
      enable = true;
      enableOffloadCmd = true;
    };

    # integrated
    # intelBusId = "PCI:0:0:0";
    amdgpuBusId = "PCI:6:0:0"
    
    # dedicated
    nvidiaBusId = "PCI:1:0:0";
  };

  specialisation = {
    gaming-time.configuration = {

      hardware.nvidia = {
        prime.sync.enable = lib.mkForce true;
        prime.offload = {
          enable = lib.mkForce false;
          enableOffloadCmd = lib.mkForce false;
        };
      };

    };
  };

}

getting ids

nix shell nixpkgs#pciutils -c lspci | grep ' VGA '"

wrappers

# configuration.nix

{ pkgs, ... }:

{

  programs.steam.enable = true;
  programs.steam.gamescopeSession.enable = true;

  environment.systemPackages = with pkgs; [
    mangohud
  ];

  programs.gamemode.enable = true;

}

protonup

# configuration.nix

{ pkgs, ... }:

{

  environment.systemPackages = with pkgs; [
    protonup
  ];
  
  environment.sessionVariables = {
    STEAM_EXTRA_COMPAT_TOOLS_PATHS =
      "\${HOME}/.steam/root/compatibilitytools.d";
  };

}
# home.nix

{ pkgs, ... }:

{

  home.packages = with pkgs; [
    protonup
  ];

  home.sessionVariables = {
    STEAM_EXTRA_COMPAT_TOOLS_PATHS =
      "\\\${HOME}/.steam/root/compatibilitytools.d";
  };

}
protonup -d "~/.steam/root/compatibilitytools.d/"

nixos-hardware

https://github.com/NixOS/nixos-hardware

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •