Talk:Games: Difference between revisions
imported>L0b0 →Why list games?: new section |
imported>Dietr1ch No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
[[User:L0b0|L0b0]] ([[User talk:L0b0|talk]]) 06:04, 18 October 2022 (UTC) | [[User:L0b0|L0b0]] ([[User talk:L0b0|talk]]) 06:04, 18 October 2022 (UTC) | ||
I agree this page should be deleted, most steam games runs without hack, and for other games, it's mostly the same logic of using steam-run or something like that, we don't need to list them one by one. | |||
--[[User:Rapenne-s|Rapenne-s]] ([[User talk:Rapenne-s|talk]]) 20:00, 20 October 2022 (UTC) | |||
== Using a games group == | |||
I've been using a games group to handle permissions to adjust some limits (through gamemoderun usage from steam and lutris/wine) | |||
This is the excerpt of my config. In it's current form it might be helpful to some, but it requires some additional work before it can be added to the Wiki, like diving into the reasoning, and maybe explaining how to use `gamemoderun` on steam and/or other platforms. | |||
<syntaxHighlight lang=nix> | |||
users.users.dietr1ch = { | |||
extraGroups = [ | |||
"games" | |||
]; | |||
}; | |||
</syntaxHighlight> | |||
<syntaxHighlight lang=nix> | |||
programs = { | |||
gamemode = { | |||
enable = true; | |||
settings = { | |||
general = { | |||
inhibit_screensaver = 0; | |||
renice = 0; | |||
softrealtime = "auto"; | |||
}; | |||
}; | |||
}; | |||
}; | |||
users.groups = { | |||
# Users that will play games | |||
"games" = { | |||
gid = 666; | |||
}; | |||
}; | |||
environment = { | |||
systemPackages = with pkgs; [ | |||
gamemode | |||
]; | |||
}; | |||
services = { | |||
udev = { | |||
extraRules = '' | |||
KERNEL=="cpu_dma_latency", GROUP="games" | |||
''; | |||
}; | |||
}; | |||
security = { | |||
sudo = { | |||
extraRules = [ | |||
{ | |||
groups = [ | |||
"games" | |||
]; | |||
commands = [ | |||
{ | |||
command = "${pkgs.gamemode}/bin/gamemoderun"; | |||
options = [ "NOPASSWD" ]; | |||
} | |||
{ | |||
command = "${pkgs.gamemode}/libexec/cpugovctl"; | |||
options = [ "NOPASSWD" ]; | |||
} | |||
{ | |||
command = "${pkgs.gamemode}/libexec/gpuclockctl"; | |||
options = [ "NOPASSWD" ]; | |||
} | |||
]; | |||
} | |||
]; | |||
}; | |||
pam = { | |||
# Higher resource limits. Used by Lutris/Wine. | |||
loginLimits = [ | |||
{ domain = "@games"; item = "nofile"; type = "soft"; value = "1048576"; } | |||
{ domain = "@games"; item = "nofile"; type = "hard"; value = "1048576"; } | |||
{ domain = "@games"; type = "-"; item = "rtprio"; value = 98; } | |||
{ domain = "@games"; type = "-"; item = "memlock"; value = "unlimited"; } | |||
{ domain = "@games"; type = "-"; item = "nice"; value = -11; } | |||
]; | |||
}; | |||
}; | |||
</syntaxHighlight> |