nix-conf/system/modules/gaming.nix
2025-04-01 12:26:01 +08:00

51 lines
1,016 B
Nix

{
lib,
pkgs,
...
}:
{
nix = {
settings = {
warn-dirty = false;
experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true;
substituters = [ "https://nix-gaming.cachix.org" ];
trusted-public-keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
];
};
};
programs = {
steam = {
enable = true;
protontricks.enable = true;
gamescopeSession.enable = true;
extest.enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
extraPackages = with pkgs; [
mangohud
gamescope
];
};
};
hardware.steam-hardware.enable = true;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
];
}