meta: Various gaming fixes
- Fix Vortex Mod Manager by giving it access to /mnt/Storage (Bad, but well) - Add package: razer-cli - Tell gamemode to put my GPU in performance mode - Tell gamemode to enable or disable keyboard backlight - Switch the miku kernel to Zen
This commit is contained in:
parent
1361348bf1
commit
648da7e05a
@ -47,7 +47,7 @@
|
||||
evolution
|
||||
|
||||
# Proprietary stuff (yikes)
|
||||
discord-wrapped #discord-app-wrapped
|
||||
discord-wrapped discord-app-wrapped
|
||||
spotify-wrapped
|
||||
vortex-wrapped
|
||||
zoom-vm
|
||||
@ -114,7 +114,9 @@
|
||||
#};
|
||||
};
|
||||
|
||||
boot = {
|
||||
boot = let
|
||||
kernel = pkgs.linuxPackages_zen;
|
||||
in {
|
||||
extraModprobeConfig = ''
|
||||
options kvm_amd nested=1
|
||||
options vfio-pci ids=1002:67df,1002:aaf0
|
||||
@ -144,12 +146,12 @@
|
||||
"pci=noaer"
|
||||
];
|
||||
|
||||
extraModulePackages = [ pkgs.linuxPackages_xanmod.vendor-reset ];
|
||||
extraModulePackages = [ kernel.vendor-reset ];
|
||||
|
||||
# NOTE: A regression appears to have happend between 5.10 and 5.12
|
||||
# which leads to the RX590 to have the fence fallback timer on
|
||||
# sdma0 time out (whatever this means). Maybe bisect?
|
||||
kernelPackages = pkgs.linuxPackages_xanmod;
|
||||
kernelPackages = kernel;
|
||||
};
|
||||
services = {
|
||||
ratbagd.enable = true;
|
||||
@ -168,6 +170,11 @@
|
||||
|
||||
hardware = {
|
||||
opentabletdriver.enable = true;
|
||||
openrazer = {
|
||||
enable = true;
|
||||
devicesOffOnScreensaver = true;
|
||||
users = [ "alexander" ];
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Move into modules
|
||||
|
@ -8,7 +8,10 @@ in {
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
wineWowPackages.staging winetricks lutris-free-wrapped
|
||||
wineWowPackages.staging winetricks
|
||||
protontricks
|
||||
|
||||
lutris-free-wrapped
|
||||
|
||||
(pkgs.callPackage ./wrapper.nix {
|
||||
inherit (pkgs) retroarch;
|
||||
@ -20,6 +23,8 @@ in {
|
||||
steam-wrapped # Custom package
|
||||
|
||||
nur.repos.dukzcry.gamescope
|
||||
|
||||
corectrl
|
||||
];
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.ptw.services.gamemode;
|
||||
@ -23,6 +23,24 @@ in {
|
||||
ioprio = 0;
|
||||
inhibit_screensaver = 1;
|
||||
};
|
||||
|
||||
gpu = {
|
||||
amd_performance_level = "high";
|
||||
};
|
||||
|
||||
custom = let
|
||||
razerBrightnessStartScript = pkgs.writeShellScriptBin "razer-brightness-start.sh" ''
|
||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer BlackWidow Ultimate 2013" -b 1
|
||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer Tartarus V2" -b 50
|
||||
'';
|
||||
razerBrightnessStopScript = pkgs.writeShellScriptBin "razer-brightness-stop.sh" ''
|
||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer BlackWidow Ultimate 2013" -b 0
|
||||
${pkgs.razer-cli}/bin/razer-cli -d "Razer Tartarus V2" -b 0
|
||||
'';
|
||||
in {
|
||||
start = ''${razerBrightnessStartScript}/bin/razer-brightness-start.sh'';
|
||||
end = ''${razerBrightnessStopScript}/bin/razer-brightness-stop.sh'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,27 +3,30 @@ final: prev:
|
||||
let
|
||||
wrapInSandbox = prev.callPackage ../lib/sandbox.nix {};
|
||||
in {
|
||||
/*
|
||||
discord-app-wrapped = wrapInSandbox {
|
||||
name = "discord-app";
|
||||
package = prev.discord-app;
|
||||
binaryName = "discord-app";
|
||||
name = "discord-app-wrapped";
|
||||
launchScriptName = "discord-app";
|
||||
binary = "${prev.discord-app}/bin/discord-app";
|
||||
mountInHome = [ ".local/share/discord-app" ];
|
||||
additionalBlacklist = [ "/mnt" ];
|
||||
chdirTo = "/home/$USER";
|
||||
|
||||
version = "1.0.0";
|
||||
desktopFileArgs = {
|
||||
preDesktopFilePhase = ''
|
||||
mkdir -p $out/share/icons
|
||||
cp -L ${prev.discord}/share/pixmaps/discord.png $out/share/icons/discord.png
|
||||
'';
|
||||
desktopFileAttributes = {
|
||||
name = "discord-app-wrapped";
|
||||
#exec = "discord";
|
||||
icon = "discord";
|
||||
desktopName = "Discord-App (wrapped)";
|
||||
genericName = "Instant Messenger";
|
||||
categories = [ "Network" "InstantMessaging" ];
|
||||
#categories = [ "Network" "InstantMessaging" ];
|
||||
};
|
||||
enableDesktopFile = true;
|
||||
};
|
||||
|
||||
minecraft-wrapped = wrapInSandbox {
|
||||
/*minecraft-wrapped = wrapInSandbox {
|
||||
name = "minecraft-launcher";
|
||||
package = prev.minecraft;
|
||||
binaryName = "minecraft-launcher";
|
||||
@ -40,7 +43,7 @@ in {
|
||||
additionalBlacklist = [ "/mnt" ];
|
||||
additionalMounts = [ "/mnt/Storage/Games/SteamLibrary" ];
|
||||
chdirTo = "/home/$USER";
|
||||
|
||||
|
||||
preDesktopFilePhase = ''
|
||||
cp -Lr ${prev.steam}/share/icons $out/share/icons
|
||||
'';
|
||||
@ -138,12 +141,14 @@ in {
|
||||
chdirTo = "/mnt/Storage/Games/";
|
||||
additionalBlacklist = [ "/mnt" ];
|
||||
additionalMounts = [
|
||||
# TODO: It doesn't work if we restrict it more
|
||||
"/mnt/Storage"
|
||||
# Wine prefix
|
||||
"/mnt/Storage/Games/NewVortex"
|
||||
#"/mnt/Storage/Games/NewVortex"
|
||||
# Mod cache
|
||||
"/mnt/Storage/Vortex Mods"
|
||||
#"/mnt/Storage/Vortex Mods"
|
||||
# Only access Skyrim: SE
|
||||
"/mnt/Storage/Games/SteamLibrary/SteamLibrary/steamapps/common/Skyrim\ Special\ Edition/"
|
||||
#"/mnt/Storage/Games/SteamLibrary/SteamLibrary/steamapps/common/Skyrim\ Special\ Edition/"
|
||||
];
|
||||
mountInHome = [
|
||||
# Mod downloads
|
||||
|
@ -68,4 +68,6 @@ in {
|
||||
};
|
||||
|
||||
zoom-vm = prev.callPackage scripts/zoom-vm {};
|
||||
|
||||
razer-cli = prev.callPackage tools/hardware/razer-cli {};
|
||||
}
|
||||
|
22
packages/tools/hardware/razer-cli/default.nix
Normal file
22
packages/tools/hardware/razer-cli/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
python3, xorg
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
pname = "razer-cli";
|
||||
version = "2.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "LoLei";
|
||||
repo = "razer-cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "0vcyssswsw7gzk2xlpvcqc9fgvwxzyivsqmw5r9b391dv3wpr1y7";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = [ xorg.xrdb ];
|
||||
propagatedBuildInputs = with python3.pkgs; [ setuptools openrazer ];
|
||||
}
|
Loading…
Reference in New Issue
Block a user