dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/games/games.nix (1149B)
1## Games Configuration ##
2_: {
3 flake.modules = {
4 nixos.games = {lib, ...}: {
5 # Steam
6 programs.steam = {
7 enable = true;
8 protontricks.enable = true;
9 localNetworkGameTransfers.openFirewall = true;
10 remotePlay.openFirewall = true;
11 dedicatedServer.openFirewall = true;
12 };
13
14 # Game Mode
15 # ? # Use 'gamemoderun <command>'
16 hardware.cpu.mode = lib.mkOverride 51 "performance";
17 programs.gamemode.enable = true;
18 hardware.steam-hardware.enable = true;
19 };
20
21 homeManager.games = {
22 lib,
23 osConfig ? {},
24 ...
25 }: {
26 # Lutris
27 programs.lutris = {
28 enable = true;
29 steamPackage = osConfig.programs.steam.package;
30 winePackages = lib.optional ((osConfig.apps.wine or null) != null) osConfig.apps.wine;
31 };
32
33 home.persist.directories = [
34 "Games"
35
36 # Lutris
37 ".cache/lutris"
38 ".config/lutris"
39 ".local/share/lutris"
40
41 # Steam
42 ".local/share/applications"
43 ".local/share/icons/hicolor"
44 ".steam"
45 ".local/share/Steam"
46 ];
47 };
48 };
49}