From 75faf815b940618e84db1006b02a7413ebd61338 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 10 Jun 2024 17:06:45 +0100 Subject: [PATCH 1/2] gamescope sparky --- hosts/sparky/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/sparky/default.nix b/hosts/sparky/default.nix index 47ff70e..f49b15e 100644 --- a/hosts/sparky/default.nix +++ b/hosts/sparky/default.nix @@ -54,6 +54,7 @@ in # Steam mangohud gamemode + gamescope # WINE wine @@ -86,6 +87,8 @@ in programs.steam.enable = true; programs.gamemode.enable = true; + programs.gamescope.enable = true; + programs.steam.gamescopeSession.enable = true; nixpkgs.config.packageOverrides = pkgs: { steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ From 853755bce032b47c86dcb3a7c83d7e5ffb312a21 Mon Sep 17 00:00:00 2001 From: = Date: Sat, 15 Jun 2024 01:31:56 +0100 Subject: [PATCH 2/2] lutris --- hosts/common/optional/gaming.nix | 61 ++++++++++++++++++++++++++++++++ hosts/sparky/default.nix | 48 +------------------------ 2 files changed, 62 insertions(+), 47 deletions(-) create mode 100644 hosts/common/optional/gaming.nix diff --git a/hosts/common/optional/gaming.nix b/hosts/common/optional/gaming.nix new file mode 100644 index 0000000..82adb7c --- /dev/null +++ b/hosts/common/optional/gaming.nix @@ -0,0 +1,61 @@ +{ pkgs, lib, ... }: +{ + # Gaming + hardware.xone.enable = true; + environment.systemPackages = with pkgs; [ + #Xbox controller + linuxKernel.packages.linux_zen.xone + + # Steam + mangohud + gamemode + gamescope + + # WINE + wine + winetricks + protontricks + vulkan-tools + + # Lutris + lutris + + # Extra dependencies + gnutls + openldap + libgpgerror + freetype + sqlite + libxml2 + xml2 + SDL2 + ]; + + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + # Add additional package names here + "steam" + "steam-original" + "steam-run" + ]; + + programs.steam = { + enable = true; + gamescopeSession.enable = true; + }; + + programs.gamemode.enable = true; + programs.gamescope.enable = true; + + nixpkgs.config.packageOverrides = pkgs: { + steam = pkgs.steam.override { + extraPkgs = pkgs: with pkgs; [ + pango + libthai + harfbuzz + gamemode + ]; + }; + }; + +} diff --git a/hosts/sparky/default.nix b/hosts/sparky/default.nix index f49b15e..a9b17ab 100644 --- a/hosts/sparky/default.nix +++ b/hosts/sparky/default.nix @@ -27,6 +27,7 @@ in # Import optional options ../common/optional/openssh.nix ../common/optional/persistence.nix + ../common/optional/gaming.nix ]; @@ -45,61 +46,14 @@ in enableIPv6 = false; }; - # Gaming - hardware.xone.enable = true; - environment.systemPackages = with pkgs; [ - #Xbox controller - linuxKernel.packages.linux_zen.xone - - # Steam - mangohud - gamemode - gamescope - - # WINE - wine - winetricks - protontricks - vulkan-tools - - # Extra dependencies - # https://github.com/lutris/docs/ - gnutls - openldap - libgpgerror - freetype - sqlite - libxml2 - xml2 - SDL2 - ]; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ # Add additional package names here "nvidia-x11" "nvidia-settings" "nvidia-persistenced" - "steam" - "steam-original" - "steam-run" ]; - programs.steam.enable = true; - programs.gamemode.enable = true; - programs.gamescope.enable = true; - programs.steam.gamescopeSession.enable = true; - nixpkgs.config.packageOverrides = pkgs: { - steam = pkgs.steam.override { - extraPkgs = pkgs: with pkgs; [ - pango - libthai - harfbuzz - gamemode - ]; - }; - }; - services.displayManager.defaultSession = "cinnamon"; services.libinput.enable = true;