packages: Finally fix the conundrum with bubblewrapped steam

This commit is contained in:
PapaTutuWawa 2021-09-07 12:12:05 +02:00
parent e364acb7ba
commit 18caa31652
4 changed files with 17 additions and 55 deletions

View File

@ -5,7 +5,7 @@ let
in mkHost config { in mkHost config {
userName = "alexander"; userName = "alexander";
hostName = "miku"; hostName = "miku";
overlays = [ "nur" "steam" "unstable" "simple" "custom" "emacs" ]; overlays = [ "nur" "unstable" "simple" "custom" "emacs" ];
hardwareImports = [ "amdgpu" "amd" ]; hardwareImports = [ "amdgpu" "amd" ];
programImports = [ programImports = [
"zsh" "git" "mpv" "tmux" "emacs" "firefox" "gnome-terminal" "gnome" "i18n" "gamemode" "zsh" "git" "mpv" "tmux" "emacs" "firefox" "gnome-terminal" "gnome" "i18n" "gamemode"
@ -36,7 +36,7 @@ in mkHost config {
replaysorcery # Custom package replaysorcery # Custom package
evdev-proxy # Custom package evdev-proxy # Custom package
vfio-isolate # Custom Package vfio-isolate # Custom Package
steam steam-wrapped
discord-system-electron-wrapped # Custom package discord-system-electron-wrapped # Custom package
superpaper # Custom package superpaper # Custom package
mumble mumble

View File

@ -9,7 +9,6 @@
ref = "master"; ref = "master";
rev = "ce0e9482d53d69bedc8416d8a984d00e17607826"; rev = "ce0e9482d53d69bedc8416d8a984d00e17607826";
}); });
steam = import ./steam.nix { pkgs = pkgs; lib = lib; };
nur = import ./nur.nix pkgs; nur = import ./nur.nix pkgs;
unstable = import ./unstable.nix pkgs; unstable = import ./unstable.nix pkgs;
custom = import ./custom.nix pkgs; custom = import ./custom.nix pkgs;

View File

@ -1,51 +0,0 @@
{ pkgs, lib }:
final: prev:
# TODO: Replace with the commented out version below
let
buildFHSUserEnvBubblewrap = prev.callPackage ../packages/build-support/build-fhs-userenv-bubblewrap {};
steamPackages = lib.dontRecurseIntoAttrs (prev.callPackage ../packages/games/steam {
buildFHSUserEnv = buildFHSUserEnvBubblewrap;
});
in {
buildFHSUserEnvBubblewrap = buildFHSUserEnvBubblewrap;
steamPackages = steamPackages;
steam = steamPackages.steam-fhsenv.override {
extraPkgs = pkgsx: with pkgsx; [ gamemode ];
};
}
/*
let
# NOTE: This is a really messy solution
buildFHSUserEnvBubblewrap = prev.callPackage ../packages/build-support/build-fhs-userenv-bubblewrap {};
in {
steamPackages = prev.steamPackages.override {
buildFHSUserEnv = buildFHSUserEnvBubblewrap;
# Include gamemode in the FHS
#extraPkgs = (pkgs: with pkgs; [ gamemode ]);
};
steam = lib.overrideDerivation prev.steamPackages.steam-fhsenv (old: {
specifyHomeDirs = true;
mountInHome = [
".steam"
".local/share/Steam"
];
chdirTo = "/home/$USER";
additionalBlacklist = [ "/mnt" ];
additionalMounts = [ "/mnt/Storage/Games/SteamLibrary" ];
#extraEnv = {
# DRI_PRIME = "1";
#};
});
#steam = final.steamPackages.steam-fhsenv.override {
# extraPkgs = pkgs: with pkgs; [ gamemode ];
#};
steam-run = final.steam.run;
steam-run-native = (final.steam.override {
nativeOnly = true;
});
steamcmd = final.steamPackages.steamcmd;
}
*/

View File

@ -4,7 +4,6 @@ let
pySmartDL = pkgs.callPackage ./development/python/pySmartDL {}; pySmartDL = pkgs.callPackage ./development/python/pySmartDL {};
cfscrape = pkgs.callPackage ./development/python/cfscrape {}; cfscrape = pkgs.callPackage ./development/python/cfscrape {};
system_hotkey = pkgs.callPackage ./development/python/system_hotkey {}; system_hotkey = pkgs.callPackage ./development/python/system_hotkey {};
buildFHSUserEnvBubblewrap = pkgs.callPackage ./build-support/build-fhs-userenv-bubblewrap {};
discord-system-electron = pkgs.callPackage ./applications/networking/instant-messengers/discord { discord-system-electron = pkgs.callPackage ./applications/networking/instant-messengers/discord {
# Wayland # Wayland
# NOTE: electron under Wayland has no window titlebars # NOTE: electron under Wayland has no window titlebars
@ -60,4 +59,19 @@ in {
surface-control = pkgs.callPackage ./tools/system/surface-control {}; surface-control = pkgs.callPackage ./tools/system/surface-control {};
trackma = pkgs.callPackage ./tools/video/trackma {}; trackma = pkgs.callPackage ./tools/video/trackma {};
steam-wrapped = wrapInSandbox {
name = "steam";
package = pkgs.steam;
binaryName = "steam";
mountInHome = [ ".steam" ".local/share/Steam" ];
additionalBlacklist = [ "/mnt" ];
additionalMounts = [ "/mnt/Storage/Games/SteamLibrary" ];
chdirTo = "/home/$USER";
extraEnv = {
DRI_PRIME = "1";
};
copyIntoSandbox = [ "/share" ];
};
} }