Compare commits
No commits in common. "3b6d75d41cc2922e823c6d9213012e7fd855f02b" and "93dc3db7a5a3c262bdb0c48cbc64ec00bfb2625a" have entirely different histories.
3b6d75d41c
...
93dc3db7a5
7 changed files with 371 additions and 167 deletions
20
flake.nix
20
flake.nix
|
@ -34,20 +34,15 @@
|
||||||
|
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
|
|
||||||
## Gaming Packages ##
|
## Misc Packages ##
|
||||||
|
|
||||||
nix-gaming = {
|
nix-gaming = {
|
||||||
url = "github:fufexan/nix-gaming";
|
url = "github:fufexan/nix-gaming";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
play = {
|
|
||||||
url = "github:tophc7/play.nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
## Misc Packages ##
|
|
||||||
|
|
||||||
# nixcord.url = "github:kaylorben/nixcord";
|
# nixcord.url = "github:kaylorben/nixcord";
|
||||||
# spicetify-nix = {
|
# spicetify-nix = {
|
||||||
# url = "github:Gerg-L/spicetify-nix";
|
# url = "github:Gerg-L/spicetify-nix";
|
||||||
|
@ -60,8 +55,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
snapraid-aio = {
|
snapraid-aio = {
|
||||||
url = "github:tophc7/snapraid-aio.nix";
|
# url = "git+https://git.ryot.foo/toph/snapraid-aio.nix.git";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
url = "git+https://git.ryot.foo/toph/snapraid-aio.nix.git";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
vscode-server = {
|
vscode-server = {
|
||||||
|
@ -70,8 +66,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
yay = {
|
yay = {
|
||||||
url = "github:tophc7/yay.nix";
|
url = "git+https://git.ryot.foo/toph/yay.nix.git";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
zen-browser = {
|
zen-browser = {
|
||||||
|
|
|
@ -1,69 +1,170 @@
|
||||||
|
## NOTE:
|
||||||
|
## This is only configured for AMD GPUs; Nvidia might require additional configuration.
|
||||||
|
## For example host (PC) configuration using this module go to home/hosts/rune
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
osConfig,
|
|
||||||
lib,
|
lib,
|
||||||
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
let
|
||||||
imports = [
|
primaryMonitor = lib.custom.getPrimaryMonitor (config.monitors or [ ]);
|
||||||
inputs.play.homeManagerModules.play
|
WIDTH = primaryMonitor.width or 1980;
|
||||||
|
HEIGHT = primaryMonitor.height or 1080;
|
||||||
|
REFRESH_RATE = primaryMonitor.refreshRate or 60;
|
||||||
|
VRR = primaryMonitor.vrr or false;
|
||||||
|
HDR = primaryMonitor.hdr or false;
|
||||||
|
|
||||||
|
cursorTheme = config.home.pointerCursor.name or "Adwaita";
|
||||||
|
cursorPackage = config.home.pointerCursor.package or pkgs.gnome.adwaita-icon-theme;
|
||||||
|
|
||||||
|
# INFO: Example working commands for running games in steam-session
|
||||||
|
## Rivals ##
|
||||||
|
# SteamDeck=1 LD_PRELOAD="" PROTON_ENABLE_NVAPI=1 PROTON_ENABLE_WAYLAND=1 VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait gamemoderun %command% -PSOCompileMode=1 -dx12
|
||||||
|
## Stats Overlay ##
|
||||||
|
# gamemoderun mangohud %command%
|
||||||
|
|
||||||
|
gamescope-env = ''
|
||||||
|
set -x DXVK_HDR 1
|
||||||
|
set -x ENABLE_GAMESCOPE_WSI 1
|
||||||
|
set -x ENABLE_HDR_WSI 1
|
||||||
|
set -x AMD_VULKAN_ICD RADV
|
||||||
|
set -x RADV_PERFTEST aco
|
||||||
|
set -x SDL_VIDEODRIVER wayland
|
||||||
|
set -x XCURSOR_THEME '${cursorTheme}'
|
||||||
|
set -x XCURSOR_PATH '${cursorPackage}/share/icons'
|
||||||
|
|
||||||
|
# Wayland specific environment variables
|
||||||
|
# set -x PROTON_USE_SDL 1
|
||||||
|
set -x PROTON_USE_WAYLAND 1
|
||||||
|
set -x PROTON_ENABLE_HDR 1
|
||||||
|
|
||||||
|
# Gamescope display identifier
|
||||||
|
set -x GAMESCOPE_WAYLAND_DISPLAY "gamescope-0"
|
||||||
|
|
||||||
|
# Steam specific environment variables
|
||||||
|
set -x STEAM_FORCE_DESKTOPUI_SCALING 1
|
||||||
|
set -x STEAM_GAMEPADUI 1
|
||||||
|
set -x STEAM_GAMESCOPE_CLIENT 1
|
||||||
|
|
||||||
|
# Lutris specific environment variables
|
||||||
|
set -x LUTRIS_SKIP_INIT 1
|
||||||
|
set -x DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 1
|
||||||
|
set -x DISABLE_LAYER_NV_OPTIMUS_1 1
|
||||||
|
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Base gamescope options
|
||||||
|
gamescope-base-opts =
|
||||||
|
[
|
||||||
|
"--fade-out-duration"
|
||||||
|
"200"
|
||||||
|
"-w"
|
||||||
|
"${toString WIDTH}"
|
||||||
|
"-h"
|
||||||
|
"${toString HEIGHT}"
|
||||||
|
"-r"
|
||||||
|
"${toString REFRESH_RATE}"
|
||||||
|
"-f"
|
||||||
|
"--backend"
|
||||||
|
"sdl"
|
||||||
|
"--rt"
|
||||||
|
"--immediate-flips"
|
||||||
|
]
|
||||||
|
++ lib.optionals HDR [
|
||||||
|
"--hdr-enabled"
|
||||||
|
"--hdr-debug-force-output"
|
||||||
|
"--hdr-itm-enable"
|
||||||
|
]
|
||||||
|
++ lib.optionals VRR [
|
||||||
|
"--adaptive-sync"
|
||||||
];
|
];
|
||||||
|
|
||||||
play = {
|
# Run gamescope with a set working environment
|
||||||
monitors = config.monitors; # I use the same module as in play.nix
|
gamescope-run = pkgs.writeScriptBin "gamescope-run" ''
|
||||||
gamescoperun = {
|
#!${lib.getExe pkgs.fish}
|
||||||
enable = true;
|
|
||||||
useGit = true;
|
|
||||||
|
|
||||||
# Extra environment variables
|
# Check if we're already inside a Gamescope session
|
||||||
environment = {
|
if set -q GAMESCOPE_WAYLAND_DISPLAY
|
||||||
XCURSOR_THEME = config.home.pointerCursor.name or "Adwaita";
|
echo "Already inside Gamescope session ($GAMESCOPE_WAYLAND_DISPLAY), running command directly..."
|
||||||
XCURSOR_PATH = "${config.home.pointerCursor.package or pkgs.adwaita-icon-theme}/share/icons";
|
# Skip gamescope and run the command directly
|
||||||
};
|
exec $argv
|
||||||
};
|
end
|
||||||
|
|
||||||
wrappers = {
|
# Session Environment
|
||||||
steam = {
|
${gamescope-env}
|
||||||
enable = true;
|
|
||||||
command = "${lib.getExe osConfig.programs.steam.package} -bigpicture -tenfoot";
|
|
||||||
extraOptions = {
|
|
||||||
"steam" = true; # equivalent to --steam flag
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
STEAM_FORCE_DESKTOPUI_SCALING = 1;
|
|
||||||
STEAM_GAMEPADUI = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
heroic = {
|
# Define and parse arguments using fish's built-in argparse
|
||||||
enable = true;
|
argparse -i 'x/extra-args=' -- $argv
|
||||||
package = pkgs.heroic; # No special package configured by play.nix
|
if test $status -ne 0
|
||||||
extraOptions = {
|
exit 1
|
||||||
"force-windows-fullscreen" = true;
|
end
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
lutris = {
|
# The remaining arguments ($argv) are the command to be run
|
||||||
enable = true;
|
if test (count $argv) -eq 0
|
||||||
package = osConfig.play.lutris.package;
|
echo "Usage: gamescope-run [-x|--extra-args \"<options>\"] <command> [args...]"
|
||||||
extraOptions = {
|
echo ""
|
||||||
"force-windows-fullscreen" = true;
|
echo "Examples:"
|
||||||
};
|
echo " gamescope-run heroic"
|
||||||
environment = {
|
echo " gamescope-run -x \"--fsr-upscaling-sharpness 5\" steam"
|
||||||
LUTRIS_SKIP_INIT = 1;
|
echo " GAMESCOPE_EXTRA_OPTS=\"--fsr\" gamescope-run steam (legacy)"
|
||||||
};
|
exit 1
|
||||||
};
|
end
|
||||||
};
|
|
||||||
};
|
# Combine base args, extra args from CLI, and extra args from env (for legacy)
|
||||||
|
set -l final_args ${lib.escapeShellArgs gamescope-base-opts}
|
||||||
|
|
||||||
|
# Add args from -x/--extra-args flag, splitting the string into a list
|
||||||
|
if set -q _flag_extra_args
|
||||||
|
set -a final_args (string split ' ' -- $_flag_extra_args)
|
||||||
|
end
|
||||||
|
|
||||||
|
# For legacy support, add args from GAMESCOPE_EXTRA_OPTS if it exists
|
||||||
|
if set -q GAMESCOPE_EXTRA_OPTS
|
||||||
|
set -a final_args (string split ' ' -- $GAMESCOPE_EXTRA_OPTS)
|
||||||
|
end
|
||||||
|
|
||||||
|
# Show the command being executed
|
||||||
|
echo -e "\033[1;36m[gamescope-run]\033[0m Running: \033[1;34m${lib.getExe pkgs.gamescope_git}\033[0m $final_args \033[1;32m--\033[0m $argv"
|
||||||
|
|
||||||
|
# Execute gamescope with the final arguments and the command
|
||||||
|
exec ${lib.getExe pkgs.gamescope_git} $final_args -- $argv
|
||||||
|
'';
|
||||||
|
|
||||||
|
## Effectively forces gamescope-run to be the default way to use Steam
|
||||||
|
## Why? Because , .desktops created by Steam would not run under gamescope-run otherwise
|
||||||
|
## !!! do not use 'pkgs.steam', it will not be configured correctly
|
||||||
|
steam-wrapper = pkgs.writeScriptBin "steam" ''
|
||||||
|
#!${lib.getExe pkgs.fish}
|
||||||
|
# This script wraps the original steam command to launch it
|
||||||
|
# with gamescope-run in a big picture mode.
|
||||||
|
# All arguments passed to this script are forwarded.
|
||||||
|
exec ${lib.getExe gamescope-run} -x "-e" ${lib.getExe osConfig.programs.steam.package} -tenfoot $argv
|
||||||
|
'';
|
||||||
|
|
||||||
|
## Ensures that all Lutris game launches go through Gamescope
|
||||||
|
## !!! This breaks the Lutris GUI, so use the overridden .desktop entry for opening Lutris itself
|
||||||
|
lutris-wrapper = pkgs.writeScriptBin "lutris" ''
|
||||||
|
#!${lib.getExe pkgs.fish}
|
||||||
|
# This script wraps the original lutris command to launch it
|
||||||
|
# with gamescope-run. All arguments passed to this script are forwarded.
|
||||||
|
exec ${lib.getExe gamescope-run} -x "--force-windows-fullscreen" ${lib.getExe pkgs.lutris} $argv
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
steam-run
|
||||||
|
steam-wrapper
|
||||||
|
gamescope-run
|
||||||
|
lutris-wrapper
|
||||||
|
];
|
||||||
|
|
||||||
# Override default desktop entries to use gamescope wrappers
|
|
||||||
xdg.desktopEntries = {
|
xdg.desktopEntries = {
|
||||||
steam = {
|
steam = {
|
||||||
name = "Steam";
|
name = "Steam";
|
||||||
comment = "Steam Big Picture in Gamescope Session";
|
comment = "Steam Big Picture in Gamescope Session";
|
||||||
exec = "${lib.getExe config.play.wrappers.steam.wrappedPackage}";
|
exec = "${lib.getExe steam-wrapper}";
|
||||||
icon = "steam";
|
icon = "steam";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
|
@ -82,7 +183,7 @@
|
||||||
actions = {
|
actions = {
|
||||||
bigpicture = {
|
bigpicture = {
|
||||||
name = "Steam Client (No Gamescope)";
|
name = "Steam Client (No Gamescope)";
|
||||||
exec = "${lib.getExe (config.play.steam.package or pkgs.steam)}";
|
exec = "${lib.getExe pkgs.steam}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -90,7 +191,7 @@
|
||||||
"com.heroicgameslauncher.hgl" = {
|
"com.heroicgameslauncher.hgl" = {
|
||||||
name = "Heroic Games Launcher";
|
name = "Heroic Games Launcher";
|
||||||
comment = "Heroic in Gamescope Session";
|
comment = "Heroic in Gamescope Session";
|
||||||
exec = "${lib.getExe config.play.wrappers.heroic.wrappedPackage}";
|
exec = ''${lib.getExe gamescope-run} -x "--force-windows-fullscreen" ${lib.getExe pkgs.heroic}'';
|
||||||
icon = "com.heroicgameslauncher.hgl";
|
icon = "com.heroicgameslauncher.hgl";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
|
@ -106,7 +207,7 @@
|
||||||
"net.lutris.Lutris" = {
|
"net.lutris.Lutris" = {
|
||||||
name = "Lutris";
|
name = "Lutris";
|
||||||
comment = "Video Game Preservation Platform";
|
comment = "Video Game Preservation Platform";
|
||||||
exec = "${lib.getExe (config.play.lutris.package or pkgs.lutris)} %U";
|
exec = "${lib.getExe pkgs.lutris} %U";
|
||||||
icon = "net.lutris.Lutris";
|
icon = "net.lutris.Lutris";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
|
@ -121,14 +222,12 @@
|
||||||
actions = {
|
actions = {
|
||||||
broken = {
|
broken = {
|
||||||
name = "Lutris (Gamescope BROKEN)";
|
name = "Lutris (Gamescope BROKEN)";
|
||||||
exec = "${lib.getExe config.play.wrappers.lutris.wrappedPackage}";
|
exec = ''${lib.getExe gamescope-run} -x "--force-windows-fullscreen" ${lib.getExe pkgs.lutris}'';
|
||||||
};
|
};
|
||||||
|
|
||||||
broken-exposed = {
|
broken-exposed = {
|
||||||
name = "Lutris (Gamescope BROKEN; Exposed Wayland)";
|
name = "Lutris (Gamescope BROKEN; Exposed Wayland)";
|
||||||
exec = ''${lib.getExe config.play.gamescoperun.package} -x "--force-windows-fullscreen --expose-wayland" ${
|
exec = ''${lib.getExe gamescope-run} -x "--force-windows-fullscreen --expose-wayland" ${lib.getExe pkgs.lutris}'';
|
||||||
lib.getExe (config.play.lutris.package or pkgs.lutris)
|
|
||||||
}'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,58 +10,9 @@ with lib.hm.gvariant;
|
||||||
folder-children = [
|
folder-children = [
|
||||||
"System"
|
"System"
|
||||||
"Utilities"
|
"Utilities"
|
||||||
"9749f26a-a257-4d4f-937f-e3dd64217eb5"
|
|
||||||
"2e37c30a-0da6-400b-b4d1-172dd613cddc"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
"folders/2e37c30a-0da6-400b-b4d1-172dd613cddc" = {
|
|
||||||
apps = [
|
|
||||||
"Against the Storm.desktop"
|
|
||||||
"ASTRONEER.desktop"
|
|
||||||
"Bloons TD 6.desktop"
|
|
||||||
"Bloons TD Battles 2.desktop"
|
|
||||||
"Enshrouded.desktop"
|
|
||||||
"It Takes Two.desktop"
|
|
||||||
"Persona5 The Phantom X.desktop"
|
|
||||||
"R.E.P.O..desktop"
|
|
||||||
"The Alters.desktop"
|
|
||||||
];
|
|
||||||
name = "Games";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/app-folders/folders/9749f26a-a257-4d4f-937f-e3dd64217eb5" = {
|
|
||||||
apps = [
|
|
||||||
"waydroid.de.szalkowski.activitylauncher.desktop"
|
|
||||||
"waydroid.com.android.inputmethod.latin.desktop"
|
|
||||||
"waydroid.com.handycloset.android.eraser.desktop"
|
|
||||||
"waydroid.org.lineageos.jelly.desktop"
|
|
||||||
"waydroid.com.android.calculator2.desktop"
|
|
||||||
"waydroid.org.lineageos.etar.desktop"
|
|
||||||
"waydroid.com.android.camera2.desktop"
|
|
||||||
"waydroid.com.android.deskclock.desktop"
|
|
||||||
"waydroid.com.android.contacts.desktop"
|
|
||||||
"waydroid.com.android.documentsui.desktop"
|
|
||||||
"waydroid.com.android.gallery3d.desktop"
|
|
||||||
"waydroid.com.google.android.apps.bard.desktop"
|
|
||||||
"waydroid.com.android.vending.desktop"
|
|
||||||
"waydroid.com.google.android.apps.chromecast.app.desktop"
|
|
||||||
"waydroid.app.pinya.lime.desktop"
|
|
||||||
"waydroid.com.mojang.minecraftpe.desktop"
|
|
||||||
"waydroid.com.atomicadd.tinylauncher.desktop"
|
|
||||||
"waydroid.org.lineageos.eleven.desktop"
|
|
||||||
"waydroid.tw.nekomimi.nekogram.desktop"
|
|
||||||
"waydroid.com.smartpack.packagemanager.desktop"
|
|
||||||
"waydroid.org.lineageos.recorder.desktop"
|
|
||||||
"waydroid.com.android.settings.desktop"
|
|
||||||
"waydroid.com.niksoftware.snapseed.desktop"
|
|
||||||
"Waydroid.desktop"
|
|
||||||
"com.jaoushingan.WaydroidHelper.desktop"
|
|
||||||
];
|
|
||||||
name = "Waydroid";
|
|
||||||
translate = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/app-folders/folders/System" = {
|
"org/gnome/desktop/app-folders/folders/System" = {
|
||||||
apps = [
|
apps = [
|
||||||
"btop.desktop"
|
"btop.desktop"
|
||||||
|
@ -70,7 +21,6 @@ with lib.hm.gvariant;
|
||||||
"fish.desktop"
|
"fish.desktop"
|
||||||
"io.github.nokse22.inspector.desktop"
|
"io.github.nokse22.inspector.desktop"
|
||||||
"kvantummanager.desktop"
|
"kvantummanager.desktop"
|
||||||
"io.github.ilya_zlobintsev.LACT.desktop"
|
|
||||||
"org.gnome.Logs.desktop"
|
"org.gnome.Logs.desktop"
|
||||||
"cups.desktop"
|
"cups.desktop"
|
||||||
"micro.desktop"
|
"micro.desktop"
|
||||||
|
@ -78,10 +28,9 @@ with lib.hm.gvariant;
|
||||||
"protontricks.desktop"
|
"protontricks.desktop"
|
||||||
"qt5ct.desktop"
|
"qt5ct.desktop"
|
||||||
"qt6ct.desktop"
|
"qt6ct.desktop"
|
||||||
"solaar.desktop"
|
"yazi.desktop"
|
||||||
"org.gnome.SystemMonitor.desktop"
|
"org.gnome.SystemMonitor.desktop"
|
||||||
"org.gnome.tweaks.desktop"
|
"org.gnome.tweaks.desktop"
|
||||||
"yazi.desktop"
|
|
||||||
];
|
];
|
||||||
name = "X-GNOME-Shell-System.directory";
|
name = "X-GNOME-Shell-System.directory";
|
||||||
translate = true;
|
translate = true;
|
||||||
|
@ -113,36 +62,6 @@ with lib.hm.gvariant;
|
||||||
translate = true;
|
translate = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
"org/gnome/desktop/app-folders/folders/c4b3dde8-cab4-48b0-a20d-6519c6cee231" = {
|
|
||||||
apps = [
|
|
||||||
"waydroid.de.szalkowski.activitylauncher.desktop"
|
|
||||||
"waydroid.com.android.inputmethod.latin.desktop"
|
|
||||||
"waydroid.com.handycloset.android.eraser.desktop"
|
|
||||||
"waydroid.org.lineageos.jelly.desktop"
|
|
||||||
"waydroid.com.android.calculator2.desktop"
|
|
||||||
"waydroid.org.lineageos.etar.desktop"
|
|
||||||
"waydroid.com.android.camera2.desktop"
|
|
||||||
"waydroid.com.android.deskclock.desktop"
|
|
||||||
"waydroid.com.android.contacts.desktop"
|
|
||||||
"waydroid.com.android.documentsui.desktop"
|
|
||||||
"waydroid.com.android.gallery3d.desktop"
|
|
||||||
"waydroid.com.google.android.apps.bard.desktop"
|
|
||||||
"waydroid.com.android.vending.desktop"
|
|
||||||
"waydroid.com.google.android.apps.chromecast.app.desktop"
|
|
||||||
"waydroid.app.pinya.lime.desktop"
|
|
||||||
"waydroid.com.mojang.minecraftpe.desktop"
|
|
||||||
"waydroid.com.atomicadd.tinylauncher.desktop"
|
|
||||||
"waydroid.org.lineageos.eleven.desktop"
|
|
||||||
"waydroid.tw.nekomimi.nekogram.desktop"
|
|
||||||
"waydroid.com.smartpack.packagemanager.desktop"
|
|
||||||
"waydroid.org.lineageos.recorder.desktop"
|
|
||||||
"waydroid.com.android.settings.desktop"
|
|
||||||
"waydroid.com.niksoftware.snapseed.desktop"
|
|
||||||
];
|
|
||||||
name = "Android";
|
|
||||||
translate = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/nautilus/preferences" = {
|
"org/gnome/nautilus/preferences" = {
|
||||||
default-folder-viewer = "icon-view";
|
default-folder-viewer = "icon-view";
|
||||||
migrated-gtk-settings = true;
|
migrated-gtk-settings = true;
|
||||||
|
@ -168,6 +87,7 @@ with lib.hm.gvariant;
|
||||||
welcome-dialog-last-shown-version = "48.1";
|
welcome-dialog-last-shown-version = "48.1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
## FIXME: Something is off with the Cloud S output
|
||||||
"org/gnome/shell/extensions/quicksettings-audio-devices-hider" = {
|
"org/gnome/shell/extensions/quicksettings-audio-devices-hider" = {
|
||||||
available-input-names = [
|
available-input-names = [
|
||||||
"Digital Input (S/PDIF) \8211 USB Live camera"
|
"Digital Input (S/PDIF) \8211 USB Live camera"
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
## NOTE:
|
||||||
|
## This is only configured for AMD GPUs; Nvidia might require additional configuration.
|
||||||
|
## For example host (PC) configuration using this module go to hosts/x86/rune
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
@ -6,27 +9,106 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
hardware.graphics = {
|
||||||
inputs.play.nixosModules.play
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
lact # AMDgpu tool
|
||||||
|
heroic
|
||||||
|
gamescope_git
|
||||||
|
gamescope-wsi_git
|
||||||
|
(pkgs.lutris.override {
|
||||||
|
extraPkgs = pkgs: [
|
||||||
|
pkgs.wineWowPackages.waylandFull
|
||||||
|
pkgs.winetricks
|
||||||
|
vulkan-tools
|
||||||
|
xterm
|
||||||
|
];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
play = {
|
systemd = {
|
||||||
amd.enable = true;
|
packages = with pkgs; [ lact ];
|
||||||
ananicy.enable = true;
|
services.lactd.wantedBy = [ "multi-user.target" ];
|
||||||
gamemode.enable = true;
|
};
|
||||||
|
|
||||||
|
# Instead of set -x CAP_SYS_NICE eip
|
||||||
|
services.ananicy = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.ananicy-cpp;
|
||||||
|
rulesProvider = pkgs.ananicy-cpp;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
"name" = "gamescope";
|
||||||
|
"nice" = -20;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
protontricks = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.protontricks;
|
||||||
|
};
|
||||||
|
|
||||||
|
package = pkgs.steam.override {
|
||||||
|
extraPkgs =
|
||||||
|
pkgs:
|
||||||
|
(builtins.attrValues {
|
||||||
|
inherit (pkgs.xorg)
|
||||||
|
libXcursor
|
||||||
|
libXi
|
||||||
|
libXinerama
|
||||||
|
libXScrnSaver
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit (pkgs.stdenv.cc.cc)
|
||||||
|
lib
|
||||||
|
;
|
||||||
|
|
||||||
|
inherit (pkgs)
|
||||||
|
gamemode
|
||||||
|
gperftools
|
||||||
|
keyutils
|
||||||
|
libkrb5
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libvorbis
|
||||||
|
mangohud
|
||||||
|
;
|
||||||
|
});
|
||||||
|
};
|
||||||
extraCompatPackages = with pkgs; [
|
extraCompatPackages = with pkgs; [
|
||||||
proton-ge-bin
|
proton-ge-bin
|
||||||
|
proton-ge-custom
|
||||||
|
proton-cachyos
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
lutris.enable = true;
|
gamemode = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
softrealtime = "auto";
|
||||||
|
inhibit_screensaver = 1;
|
||||||
|
renice = 15;
|
||||||
|
};
|
||||||
|
gpu = {
|
||||||
|
apply_gpu_optimisations = "accept-responsibility";
|
||||||
|
gpu_device = 1; # The DRM device number on the system (usually 0), ie. the number in /sys/class/drm/card0/
|
||||||
|
amd_performance_level = "high";
|
||||||
|
};
|
||||||
|
custom = {
|
||||||
|
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||||||
|
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Additional packages not covered by play.nix
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
heroic
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
47
pkgs/proton-cachyos/package.nix
Normal file
47
pkgs/proton-cachyos/package.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
callPackage,
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
fetchurl,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
protonGeTitle = "Proton-CachyOS";
|
||||||
|
protonGeVersions = lib.importJSON ./versions.json;
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "proton-cachyos";
|
||||||
|
version = "${protonGeVersions.base}.${protonGeVersions.release}";
|
||||||
|
|
||||||
|
src =
|
||||||
|
let
|
||||||
|
tagName = "cachyos-${protonGeVersions.base}-${protonGeVersions.release}-slr";
|
||||||
|
fileName = "proton-cachyos-${protonGeVersions.base}-${protonGeVersions.release}-slr-x86_64.tar.xz";
|
||||||
|
in
|
||||||
|
fetchurl {
|
||||||
|
url = "https://github.com/CachyOS/proton-cachyos/releases/download/${tagName}/${fileName}";
|
||||||
|
inherit (protonGeVersions) hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
buildCommand =
|
||||||
|
''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
tar -C $out/bin --strip=1 -x -f $src
|
||||||
|
''
|
||||||
|
# Replace the internal name and display name
|
||||||
|
+ lib.strings.optionalString (protonGeTitle != null) ''
|
||||||
|
sed -i -r 's|"proton-cachyos-[^"]*"|"${protonGeTitle}"|g' $out/bin/compatibilitytool.vdf
|
||||||
|
sed -i -r 's|"display_name"[[:space:]]*"[^"]*"|"display_name" "${protonGeTitle}"|' $out/bin/compatibilitytool.vdf
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = callPackage ./update.nix { };
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Compatibility tool for Steam Play based on Wine and additional components. CachyOS fork.";
|
||||||
|
homepage = "https://github.com/CachyOS/proton-cachyos";
|
||||||
|
license = licenses.bsd3;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
tophc7
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
55
pkgs/proton-cachyos/update.nix
Normal file
55
pkgs/proton-cachyos/update.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{
|
||||||
|
writeShellScript,
|
||||||
|
lib,
|
||||||
|
coreutils,
|
||||||
|
findutils,
|
||||||
|
gnugrep,
|
||||||
|
curl,
|
||||||
|
jq,
|
||||||
|
git,
|
||||||
|
nix,
|
||||||
|
nix-prefetch-git,
|
||||||
|
moreutils,
|
||||||
|
yq,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
path = lib.makeBinPath [
|
||||||
|
coreutils
|
||||||
|
curl
|
||||||
|
findutils
|
||||||
|
gnugrep
|
||||||
|
jq
|
||||||
|
moreutils
|
||||||
|
git
|
||||||
|
nix-prefetch-git
|
||||||
|
nix
|
||||||
|
yq
|
||||||
|
];
|
||||||
|
in
|
||||||
|
writeShellScript "update-proton-cachyos" ''
|
||||||
|
set -euo pipefail
|
||||||
|
PATH=${path}
|
||||||
|
|
||||||
|
srcJson=pkgs/proton-cachyos/versions.json
|
||||||
|
localBase=$(jq -r .base < $srcJson)
|
||||||
|
localRelease=$(jq -r .release < $srcJson)
|
||||||
|
|
||||||
|
latestVer=$(curl 'https://github.com/GloriousEggroll/proton-cachyos/tags.atom' | xq -r '.feed.entry[0].link."@href"' | grep -Po '(?<=/)[^/]+$')
|
||||||
|
|
||||||
|
if [ "GE-Proton''${localBase}-''${localRelease}" == "$latestVer" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
latestBase=$(echo $latestVer | grep -Po '(?<=GE-Proton)[^-]+')
|
||||||
|
latestRelease=$(echo $latestVer | grep -Po '(?<=-)[^-]+$')
|
||||||
|
latestSha256=$(nix-prefetch-url --type sha256 "https://github.com/CachyOS/proton-cachyos/releases/download/''${latestVer}/''${latestVer}.tar.gz")
|
||||||
|
latestHash=$(nix-hash --to-sri --type sha256 $latestSha256)
|
||||||
|
|
||||||
|
jq \
|
||||||
|
--arg latestBase "$latestBase" --arg latestRelease "$latestRelease" --arg latestHash "$latestHash" \
|
||||||
|
'.base = $latestBase | .release = $latestRelease | .hash = $latestHash' \
|
||||||
|
"$srcJson" | sponge "$srcJson"
|
||||||
|
|
||||||
|
git add $srcJson
|
||||||
|
git commit -m "proton-cachyos: ''${localBase}.''${localRelease} -> ''${latestBase}.''${latestRelease}"
|
||||||
|
''
|
5
pkgs/proton-cachyos/versions.json
Normal file
5
pkgs/proton-cachyos/versions.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"base": "10.0",
|
||||||
|
"release": "20250623",
|
||||||
|
"hash": "sha256-HLWWR2h+AdGfqt3Aay9Xyz7Q06NRoi3/Mp5vJtoqLlg="
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue