mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-30 22:32:03 +02:00
feat: gaming (#223)
* refactor: configure gaming suite via options, use pkgs-x64 * fix: gaming on apple silicon (not work yet)
This commit is contained in:
@@ -1,48 +1,71 @@
|
||||
{ pkgs, osConfig, ... }:
|
||||
{
|
||||
# ==========================================================================
|
||||
# Other Optimizations
|
||||
# Usage:
|
||||
# Lutris - enable advanced options, go to the System options -> Command prefix, add: `mangohud`
|
||||
# Steam - add this as a launch option: `mangohud %command%` / `gamemoderun %command%`
|
||||
# ==========================================================================
|
||||
pkgs,
|
||||
pkgs-x64,
|
||||
osConfig,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.gaming;
|
||||
in
|
||||
{
|
||||
options.modules.desktop = {
|
||||
gaming = {
|
||||
enable = mkEnableOption "Install Game Suite(steam, lutris, etc)";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# https://github.com/flightlessmango/MangoHud
|
||||
# a simple overlay program for monitoring FPS, temperature, CPU and GPU load, and more.
|
||||
mangohud
|
||||
# a game launcher - great for epic games and gog games
|
||||
(heroic.override {
|
||||
extraPkgs = pkgs: [
|
||||
pkgs.gamescope
|
||||
config = mkIf cfg.enable {
|
||||
# ==========================================================================
|
||||
# Other Optimizations
|
||||
# Usage:
|
||||
# Lutris - enable advanced options, go to the System options -> Command prefix, add: `mangohud`
|
||||
# Steam - add this as a launch option: `mangohud %command%` / `gamemoderun %command%`
|
||||
# ==========================================================================
|
||||
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
# https://github.com/flightlessmango/MangoHud
|
||||
# a simple overlay program for monitoring FPS, temperature, CPU and GPU load, and more.
|
||||
mangohud
|
||||
|
||||
# GUI for installing custom Proton versions like GE_Proton
|
||||
# proton - a Wine distribution aimed at gaming
|
||||
protonplus
|
||||
# Script to install various redistributable runtime libraries in Wine.
|
||||
winetricks
|
||||
# https://github.com/Open-Wine-Components/umu-launcher
|
||||
# a unified launcher for Windows games on Linux
|
||||
umu-launcher
|
||||
])
|
||||
++ (with pkgs-x64; [
|
||||
# a game launcher - great for epic games and gog games
|
||||
(heroic.override {
|
||||
extraPkgs = _pkgs: [
|
||||
pkgs.gamescope # aarch64
|
||||
];
|
||||
})
|
||||
]);
|
||||
|
||||
# a GUI game launcher for Steam/GoG/Epic
|
||||
programs.lutris = {
|
||||
enable = true;
|
||||
defaultWinePackage = pkgs-x64.proton-ge-bin;
|
||||
steamPackage = osConfig.programs.steam.package;
|
||||
protonPackages = [ pkgs-x64.proton-ge-bin ];
|
||||
winePackages = with pkgs-x64; [
|
||||
wineWow64Packages.full
|
||||
wineWowPackages.stagingFull
|
||||
];
|
||||
})
|
||||
# GUI for installing custom Proton versions like GE_Proton
|
||||
# proton - a Wine distribution aimed at gaming
|
||||
protonplus
|
||||
# Script to install various redistributable runtime libraries in Wine.
|
||||
winetricks
|
||||
# https://github.com/Open-Wine-Components/umu-launcher
|
||||
# a unified launcher for Windows games on Linux
|
||||
umu-launcher
|
||||
];
|
||||
|
||||
# a GUI game launcher for Steam/GoG/Epic
|
||||
programs.lutris = {
|
||||
enable = true;
|
||||
defaultWinePackage = pkgs.proton-ge-bin;
|
||||
steamPackage = osConfig.programs.steam.package;
|
||||
protonPackages = [ pkgs.proton-ge-bin ];
|
||||
winePackages = with pkgs; [
|
||||
wineWow64Packages.full
|
||||
wineWowPackages.stagingFull
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
winetricks
|
||||
gamescope
|
||||
gamemode
|
||||
mangohud
|
||||
umu-launcher
|
||||
];
|
||||
extraPackages = with pkgs; [
|
||||
winetricks
|
||||
gamescope
|
||||
gamemode
|
||||
mangohud
|
||||
umu-launcher
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-x64,
|
||||
pkgs-unstable,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
@@ -21,10 +22,8 @@
|
||||
vulkan-tools
|
||||
glxinfo
|
||||
nvitop
|
||||
]
|
||||
++ (lib.optionals pkgs.stdenv.isx86_64 [
|
||||
(zoom-us.override { hyprlandXdgDesktopPortalSupport = true; })
|
||||
]);
|
||||
(pkgs-x64.zoom-us.override { hyprlandXdgDesktopPortalSupport = true; })
|
||||
];
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user