Gaming optimizations?

This commit is contained in:
Emmet
2025-02-23 15:07:40 -06:00
parent 73c20c7f68
commit c6b672ff9c
4 changed files with 54 additions and 3 deletions

View File

@ -5,7 +5,7 @@
systemSettings = {
# users
users = [ "emmet" "corrina" ];
adminUsers = [ "emmet" ];
adminUsers = [ "emmet" "corrina" ];
# hardware
cachy.enable = true;

View File

@ -10,7 +10,9 @@ in {
};
config = lib.mkIf cfg.enable {
hardware.bluetooth.enable = true;
hardware.bluetooth = {
enable = true;
};
services.blueman.enable = true;
};
}

View File

@ -14,7 +14,55 @@ in {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "steam" "steam-unwrapped" ];
hardware.opengl.driSupport32Bit = true;
programs.steam.enable = true;
environment.systemPackages = with pkgs; [ pkgs.steam gamemode prismlauncher ];
environment.systemPackages = with pkgs;
[ steam
gamemode
prismlauncher
inotify-tools
(pkgs.writeScriptBin "steamgrab" ''chown -R $(pgrep -nf steam | xargs -r ps -o uname= -p):steam /opt/Steam;'')
];
programs.gamemode.enable = true;
programs.gamescope.enable = true;
programs.steam.gamescopeSession.enable = true;
systemSettings.bluetooth.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings.General = {
experimental = true;
Privacy = "device";
JustWorksRepairing = "always";
Class = "0x000100";
FastConnectable = true;
};
};
hardware.xpadneo.enable = true;
boot = {
extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
extraModprobeConfig = ''
options bluetooth disable_ertm=Y
'';
};
users.groups = {
steam = {
members = config.systemSettings.users;
};
};
systemd.services.steamshare = {
enable = true;
unitConfig = {
Type = "exec";
};
serviceConfig = {
ExecStart = [ ''/run/current-system/sw/bin/chmod -R 777 /opt/Steam;'' ''/run/current-system/sw/bin/inotifywait -mr -e close_write,create,moved_to,modify /opt/Steam | while /run/current-system/sw/bin/read path file; do /run/current-system/sw/bin/chmod 777 $path/$file; done;'' ];
};
wantedBy = [ "graphical.target" ];
};
services.cron = {
enable = true;
systemCronJobs = [
"*/1 * * * * steamgrab"
];
};
};
}

View File

@ -25,6 +25,7 @@ in
(lib.mkIf (cfg.variant == "hardened") pkgs.linuxPackages_cachyos-hardened)
];
services.scx.enable = true;
services.scx.scheduler = "scx_lavd";
boot.consoleLogLevel = 0;
};
}