diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-18 15:29:03 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-18 15:29:03 +0530 |
| commit | fef4ae3023a602f6379357b11382fd5ca53e73e5 (patch) | |
| tree | a8b3e1d49903348e527fc5918a062150c8db3038 /modules/gaming/heroic | |
| parent | 7f9c31ecad41ab7d9679f7c0bd34e06d98695b78 (diff) | |
| download | home-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/heroic')
| -rw-r--r-- | modules/gaming/heroic/default.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/gaming/heroic/default.nix b/modules/gaming/heroic/default.nix new file mode 100644 index 0000000..9c07f17 --- /dev/null +++ b/modules/gaming/heroic/default.nix @@ -0,0 +1,38 @@ +# Heroic Games Launcher - Epic/GOG/Amazon game launcher +{ + config, + pkgs, + lib, + ... +}: +{ + options.gaming.heroic = { + enable = lib.mkEnableOption "Enables Heroic Games Launcher."; + package = lib.mkOption { + type = lib.types.package; + default = pkgs.symlinkJoin { + name = "heroic-wrapped"; + paths = with pkgs; [ + winetricks + xdg-user-dirs + gamemode + heroic + ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/heroic \ + --prefix LD_LIBRARY_PATH : "${pkgs.gamemode.lib}/lib:${pkgs.pkgsi686Linux.gamemode.lib}/lib" + ''; + }; + description = "Heroic Games Launcher package (wrapped with GameMode support)."; + }; + }; + + config = lib.mkIf config.gaming.heroic.enable { + home.packages = [ config.gaming.heroic.package ]; + + xdg.mimeApps.defaultApplications = { + "x-scheme-handler/heroic" = "heroic.desktop"; + }; + }; +} |
