diff --git a/flake.lock b/flake.lock index e1cd970..d1a4060 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1743295846, - "narHash": "sha256-hKKz07d4RV9gzxzE5Qu3RQWX8a7XpzRrP5timoxoGRQ=", + "lastModified": 1743648554, + "narHash": "sha256-23JFd+zd2GamTTdnGuFVeIg8x8C3hLpQJRh/PGTORzo=", "owner": "nix-community", "repo": "home-manager", - "rev": "717030011980e9eb31eb8ce011261dd532bce92c", + "rev": "107352dde4ff3c01cb5a0b3fe17f5beef37215bc", "type": "github" }, "original": { @@ -44,11 +44,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1743299372, - "narHash": "sha256-vFuxkHPd+Xpi5Bx1VCyZwYl/BbF83C+KmlbPBNVJvNU=", + "lastModified": 1743644846, + "narHash": "sha256-I217zRnDlSdWzoZi4sHaRKdY+x60tLOo8TyRshkyUBM=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "2ab0a37308559926bddb0009dfcf16a2a5b34e2b", + "rev": "a6fac721ece856f5dd4690b41b92e7ba3a71d033", "type": "github" }, "original": { @@ -90,11 +90,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1743231893, - "narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=", + "lastModified": 1743576891, + "narHash": "sha256-vXiKURtntURybE6FMNFAVpRPr8+e8KoLPrYs9TGuAKc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6", + "rev": "44a69ed688786e98a101f02b712c313f1ade37ab", "type": "github" }, "original": { @@ -108,7 +108,24 @@ "inputs": { "home-manager": "home-manager", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "rpcs3-latest": "rpcs3-latest" + } + }, + "rpcs3-latest": { + "flake": false, + "locked": { + "lastModified": 1743659989, + "narHash": "sha256-qrzu2BGzaaCnUMjpqe4O/amr3fPzASUiyc8wYU5pnQQ=", + "owner": "RPCS3", + "repo": "rpcs3", + "rev": "37dbd77628f44cdef3228bdfc03127365ec7383b", + "type": "github" + }, + "original": { + "owner": "RPCS3", + "repo": "rpcs3", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 57f5809..8e99732 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nix-gaming = { - url = "github:fufexan/nix-gaming"; + url = "github:fufexan/nix-gaming"; # for glorious eggrolls + }; + rpcs3-latest = { + url = "github:RPCS3/rpcs3"; + flake = false; }; }; @@ -17,6 +21,7 @@ nixpkgs, home-manager, nix-gaming, + rpcs3-latest, ... } @ inputs: let system = "x86_64-linux"; @@ -31,6 +36,10 @@ overlays = [customPkgsOverlay]; }; lib = nixpkgs.lib; + + rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: { + src = rpcs3-latest; + }); in { nixosConfigurations = { nixos = lib.nixosSystem { @@ -46,7 +55,7 @@ homeConfigurations = { "cobray" = home-manager.lib.homeManagerConfiguration { inherit pkgs; - extraSpecialArgs = {inherit inputs;}; + extraSpecialArgs = {inherit inputs rpcs3_latest;}; modules = [./home-manager/cobray.nix]; }; }; diff --git a/home-manager/cobray.nix b/home-manager/cobray.nix index f6c2ef3..e35b4be 100644 --- a/home-manager/cobray.nix +++ b/home-manager/cobray.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + rpcs3_latest, + ... +}: { imports = [ ./modules/dunst.nix ./modules/fish.nix @@ -11,7 +15,7 @@ ./modules/starship.nix ./modules/zellij.nix ./modules/ffmpeg.nix - ./modules/emulators.nix + (import ./modules/emulators.nix {inherit pkgs rpcs3_latest;}) ]; home.username = "cobray"; diff --git a/home-manager/modules/emulators.nix b/home-manager/modules/emulators.nix index 6e32556..0e2b965 100644 --- a/home-manager/modules/emulators.nix +++ b/home-manager/modules/emulators.nix @@ -1,11 +1,8 @@ -{pkgs, ...}: let - rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: { - src = builtins.fetchGit { - url = "https://github.com/RPCS3/rpcs3.git"; - ref = "master"; - }; - }); -in { +{ + pkgs, + rpcs3_latest, + ... +}: { home.packages = with pkgs; [ mgba desmume @@ -17,11 +14,11 @@ in { retroarch mednafen joycond + # uses latest commit, but in case of errors (if there were any in the first place) to fallback to snapshot nix package in case it failed (even if not) ( if (builtins.tryEval rpcs3_latest).success then rpcs3_latest else rpcs3 ) - # uses latest commit, but in case of errors (if there were any in the first place) to fallback to snapshot nix package in case it failed (even if not) ]; }