NOflake/extras/gaming.nix

108 lines
2.5 KiB
Nix
Raw Normal View History

2024-04-20 18:47:52 -07:00
{
2025-05-22 18:48:53 -07:00
pkgs,
lib,
...
}:
# let
# if_desktop =
# if lib.strings.hasPrefix "NOcomputer" (builtins.readFile /etc/hostname)
# then true
# else false;
# in
{
2025-05-22 18:48:53 -07:00
# programs.noisetorch.enable = true;
# aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# aagl.inputs.nixpkgs.follows = "nixpkgs";
2024-04-09 10:06:48 -07:00
2025-05-22 18:48:53 -07:00
environment.systemPackages = with pkgs; [
# parsec-bin
# yuzu # nintendo can suck the shit out of my asshole
gamemode
heroic
lutris
mangohud
prismlauncher
protonup-qt
r2modman
wine
temurin-jre-bin-17
2025-05-28 17:21:16 -07:00
graalvm-ce
2025-05-22 18:48:53 -07:00
];
2023-11-01 02:14:15 -07:00
2025-05-22 18:48:53 -07:00
networking.firewall.allowedTCPPorts = [25565];
2024-06-01 17:07:25 -07:00
2025-05-22 18:48:53 -07:00
programs.steam = {
enable = true;
# remotePlay.openFirewall = true;
# gamescopeSession.enable = false;
};
programs.gamemode.enable = true;
programs.gamescope.enable = true;
2023-07-11 00:38:39 -07:00
2025-05-22 18:48:53 -07:00
security.pam.loginLimits = [
{
domain = "@game";
type = "-";
item = "nice";
value = -20;
}
];
security.sudo-rs.extraRules = [
{
commands = [
2024-03-23 01:24:31 -07:00
{
2025-05-22 18:48:53 -07:00
command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows";
options = ["NOPASSWD"];
2024-03-23 01:24:31 -07:00
}
2025-05-22 18:48:53 -07:00
];
groups = ["wheel"];
}
];
2024-03-28 08:54:48 -07:00
2025-05-22 18:48:53 -07:00
# THE FINALS audio borked
# services.pipewire.enable = !if_desktop;
# hardware.pulseaudio.enable = if_desktop;
# hardware.pulseaudio.support32Bit = if_desktop;
# services.pipewire.extraConfig = {
# pipewire."99-low-latency" = {
# context.properties = {
# default.allowed-rates = [44100 48000 96000 192000];
# default.clock.rate = 192000;
# default.clock.quantum = 32;
# default.clock.min-quantum = 32;
# default.clock.max-quantum = 32;
# };
# context.modules = [
# {
# name = "libpipewire-module-rt";
# args = {
# nice.level = -12;
# rt.prio = 89;
# rt.time.soft = 200000;
# rt.time.hard = 200000;
# };
# flags = ["ifexists nofail"];
# }
# ];
# };
# pipewire-pulse."99-low-latency" = {
# context.modules = [
# {
# name = "libpipewire-module-protocol-pulse";
# args = {
# pulse.min.req = "32/192000";
# pulse.default.req = "32/192000";
# pulse.max.req = "32/192000";
# pulse.min.quantum = "32/192000";
# pulse.max.quantum = "32/192000";
# };
# }
# ];
# stream.properties = {
# node.latency = "32/192000";
# resample.quality = 1;
# };
# };
# };
2023-07-11 00:38:39 -07:00
}