[desktop] Add custom package modrinth-nvidia
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nextcloudTalkDesktop = pkgs.callPackage ./nextcloud-talk-desktop {};
|
nextcloudTalkDesktop = pkgs.callPackage ./nextcloud-talk-desktop {};
|
||||||
|
modrinthNvidia = pkgs.callPackage ./modrinth-nvidia {};
|
||||||
}
|
}
|
||||||
|
|||||||
35
packages/modrinth-nvidia/default.nix
Normal file
35
packages/modrinth-nvidia/default.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "modrinth-nvidia";
|
||||||
|
version = "0.1.0";
|
||||||
|
src = null;
|
||||||
|
dontUnpack = true;
|
||||||
|
dontBuild = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
# Copy the original binary
|
||||||
|
cp ${pkgs.modrinth-app}/bin/ModrinthApp $out/bin/modrinth-nvidia-real
|
||||||
|
chmod +x $out/bin/modrinth-nvidia-real
|
||||||
|
|
||||||
|
# Wrap the binary with makeWrapper, producing a new script at 'modrinth-nvidia'
|
||||||
|
makeWrapper $out/bin/modrinth-nvidia-real $out/bin/modrinth-nvidia \
|
||||||
|
--set WEBKIT_DISABLE_DMABUF_RENDERER 1 \
|
||||||
|
--set WEBKIT_DISABLE_COMPOSITING_MODE 1
|
||||||
|
|
||||||
|
mkdir -p $out/share/applications
|
||||||
|
cat > $out/share/applications/modrinth-nvidia.desktop <<EOF
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Modrinth (NVIDIA)
|
||||||
|
Comment=Launch Modrinth with environment variables tuned for NVIDIA systems
|
||||||
|
Exec=$out/bin/modrinth-nvidia
|
||||||
|
Icon=modrinth-app
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Game;
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -5,11 +5,15 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.roles.desktop;
|
cfg = config.roles.desktop;
|
||||||
|
|
||||||
|
customPackages = pkgs.callPackage ../../packages {};
|
||||||
|
|
||||||
basePackages = with pkgs; [
|
basePackages = with pkgs; [
|
||||||
brightnessctl
|
brightnessctl
|
||||||
mangohud # Should probably get refactored with steam/gamescope out to a gaming role
|
mangohud # Should probably get refactored with steam/gamescope out to a gaming role
|
||||||
modrinth-app
|
modrinth-app
|
||||||
protonup-qt
|
protonup-qt
|
||||||
|
|
||||||
|
customPackages.modrinthNvidia
|
||||||
];
|
];
|
||||||
|
|
||||||
x11BasePackages = with pkgs; [
|
x11BasePackages = with pkgs; [
|
||||||
|
|||||||
Reference in New Issue
Block a user