diff --git a/flake.nix b/flake.nix index 3c9f01c..5747a04 100644 --- a/flake.nix +++ b/flake.nix @@ -15,15 +15,19 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nvim-config = { - url = "github:ISnortPennies/nvim-config"; + url = github:ISnortPennies/nvim-config; inputs.nixpkgs.follows = "nixpkgs"; }; sxhkd-flake = { - url = "github:ISnortPennies/sxhkd-flake"; + url = github:ISnortPennies/sxhkd-flake; inputs.nixpkgs.follows = "nixpkgs"; }; fetch-rs = { - url = "github:ISnortPennies/fetch-rs"; + url = github:ISnortPennies/fetch-rs; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-gaming = { + url = github:fufexan/nix-gaming; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/modules/gaming.nix b/modules/gaming.nix new file mode 100644 index 0000000..d877755 --- /dev/null +++ b/modules/gaming.nix @@ -0,0 +1,45 @@ +{ + pkgs, + inputs, + ... +}: { + environment.systemPackages = with pkgs; + [ + heroic + legendary-gl + prismlauncher + ] + ++ builtins.attrValues (inputs.nix-gaming.lib.legendaryBuilder + { + inherit (pkgs) system; + + games = { + rocket-league = { + desktopName = "Rocket League"; + + tricks = ["dxvk" "win10"]; + + icon = builtins.fetchurl { + url = "https://user-images.githubusercontent.com/36706276/203341314-eaaa0659-9b79-4f40-8b4a-9bc1f2b17e45.png"; + name = "rocket-league.png"; + sha256 = "0a9ayr3vwsmljy7dpf8wgichsbj4i4wrmd8awv2hffab82fz4ykb"; + }; + + discordIntegration = false; + gamemodeIntegration = false; + + preCommands = '' + echo "the game will start!" + ''; + + postCommands = '' + echo "the game has stopped!" + ''; + }; + }; + + opts = { + wine = inputs.nix-gaming.packages.${pkgs.system}.wine-tkg; + }; + }); +} diff --git a/systems/laptop.nix b/systems/laptop.nix index 583c232..159d651 100644 --- a/systems/laptop.nix +++ b/systems/laptop.nix @@ -16,6 +16,7 @@ "sxhkd" "xserver" "shells" + "gaming" ]; in lib.lists.forEach modules (