aboutsummaryrefslogtreecommitdiffstats
path: root/modules/gaming/default.nix
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-18 15:29:03 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-18 15:29:03 +0530
commitfef4ae3023a602f6379357b11382fd5ca53e73e5 (patch)
treea8b3e1d49903348e527fc5918a062150c8db3038 /modules/gaming/default.nix
parent7f9c31ecad41ab7d9679f7c0bd34e06d98695b78 (diff)
downloadhome-manager-config-fef4ae3023a602f6379357b11382fd5ca53e73e5.tar.gz
home-manager-config-fef4ae3023a602f6379357b11382fd5ca53e73e5.zip
refactor(gaming): extract heroic into its own module, nest steam/heroic into subdirectories
Create modules/gaming/heroic/default.nix with gaming.heroic.{enable,package} options, including gamemode LD_LIBRARY_PATH wrapping and mime handler Move steam.nix → steam/default.nix and heroic.nix → heroic/default.nix Strip heroic out of the gaming.launcher bundle in default.nix
Diffstat (limited to 'modules/gaming/default.nix')
-rw-r--r--modules/gaming/default.nix44
1 files changed, 3 insertions, 41 deletions
diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix
index a4e5c0f..463c138 100644
--- a/modules/gaming/default.nix
+++ b/modules/gaming/default.nix
@@ -1,46 +1,8 @@
# Gaming - Collection of game launchers and gaming utilities
-{
- config,
- pkgs,
- lib,
- ...
-}:
+{ ... }:
{
imports = [
- ./steam.nix
+ ./heroic
+ ./steam
];
-
- options.gaming = {
- enable = lib.mkEnableOption "gaming tools bundle (Heroic, winetricks, gamemode).";
- launcher = lib.mkOption {
- type = lib.types.package;
- default = pkgs.symlinkJoin {
- name = "heroic-bundle";
- paths = with pkgs; [
- # Wrap Heroic so it dynamically appends gamemode's library folder to LD_LIBRARY_PATH
- (pkgs.symlinkJoin {
- name = "heroic-wrapped";
- paths = [ heroic ];
- buildInputs = [ pkgs.makeWrapper ];
- postBuild = ''
- wrapProgram $out/bin/heroic \
- --prefix LD_LIBRARY_PATH : "${pkgs.gamemode.lib}/lib:${pkgs.pkgsi686Linux.gamemode.lib}/lib"
- '';
- })
- winetricks
- xdg-user-dirs
- gamemode
- ];
- };
- description = "Bundle of game launchers (Heroic), winetricks, and core gaming utilities with GameMode support.";
- };
- };
-
- config = lib.mkIf config.gaming.enable {
- home.packages = [ config.gaming.launcher ];
-
- xdg.mimeApps.defaultApplications = {
- "x-scheme-handler/heroic" = "heroic.desktop";
- };
- };
}