diff --git a/nixos/flake.lock b/nixos/flake.lock index 5e65a7ed..7495a556 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -761,6 +761,23 @@ "type": "github" } }, + "heroic-games-launcher": { + "flake": false, + "locked": { + "lastModified": 1781264135, + "narHash": "sha256-Ee0Y7CZG05J1ZK66rxfx7s7Q/1vgzVdJGagAPrRB2RM=", + "owner": "colonelpanic8", + "repo": "HeroicGamesLauncher", + "rev": "df53df1eea5eef59c7c7fc1c5d18dff8a5814838", + "type": "github" + }, + "original": { + "owner": "colonelpanic8", + "ref": "colonelpanic/epic-multi-account-switching", + "repo": "HeroicGamesLauncher", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -1963,6 +1980,7 @@ "git-ignore-nix": "git-ignore-nix", "git-sync-rs": "git-sync-rs", "grub2-themes": "grub2-themes", + "heroic-games-launcher": "heroic-games-launcher", "home-manager": "home-manager", "hypr-dynamic-cursors": "hypr-dynamic-cursors", "hypr-workspace-history": "hypr-workspace-history", diff --git a/nixos/flake.nix b/nixos/flake.nix index 34330464..686938d4 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -291,6 +291,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + heroic-games-launcher = { + url = "github:colonelpanic8/HeroicGamesLauncher?ref=colonelpanic/epic-multi-account-switching"; + flake = false; + }; + grub2-themes = { url = "github:vinceliuice/grub2-themes"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/nixos/games.nix b/nixos/games.nix index ee7ece9c..410f0978 100644 --- a/nixos/games.nix +++ b/nixos/games.nix @@ -1,10 +1,17 @@ { config, + inputs, lib, pkgs, makeEnable, ... }: let + heroicAccountSwitchingVersion = "${pkgs.heroic.version}-epic-account-switching-${inputs.heroic-games-launcher.shortRev or "dirty"}"; + heroicWithEpicAccountSwitching = pkgs.heroic.overrideAttrs (oldAttrs: { + name = "${oldAttrs.pname or "heroic"}-${heroicAccountSwitchingVersion}"; + version = heroicAccountSwitchingVersion; + src = inputs.heroic-games-launcher; + }); repairXwaylandSocket = pkgs.writeShellApplication { name = "repair-xwayland-socket"; text = '' @@ -49,7 +56,7 @@ in environment.systemPackages = with pkgs; [ repairXwaylandSocket steamWithXwaylandSocketRepair - heroic + heroicWithEpicAccountSwitching legendary-gl protontricks steam-run