This commit is contained in:
alsaiduq-lab 2025-04-03 09:23:15 -06:00
parent 440506cabf
commit aecfcb0fa6
4 changed files with 50 additions and 23 deletions

37
flake.lock generated
View file

@ -25,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743295846, "lastModified": 1743648554,
"narHash": "sha256-hKKz07d4RV9gzxzE5Qu3RQWX8a7XpzRrP5timoxoGRQ=", "narHash": "sha256-23JFd+zd2GamTTdnGuFVeIg8x8C3hLpQJRh/PGTORzo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "717030011980e9eb31eb8ce011261dd532bce92c", "rev": "107352dde4ff3c01cb5a0b3fe17f5beef37215bc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -44,11 +44,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1743299372, "lastModified": 1743644846,
"narHash": "sha256-vFuxkHPd+Xpi5Bx1VCyZwYl/BbF83C+KmlbPBNVJvNU=", "narHash": "sha256-I217zRnDlSdWzoZi4sHaRKdY+x60tLOo8TyRshkyUBM=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "2ab0a37308559926bddb0009dfcf16a2a5b34e2b", "rev": "a6fac721ece856f5dd4690b41b92e7ba3a71d033",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -90,11 +90,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1743231893, "lastModified": 1743576891,
"narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=", "narHash": "sha256-vXiKURtntURybE6FMNFAVpRPr8+e8KoLPrYs9TGuAKc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6", "rev": "44a69ed688786e98a101f02b712c313f1ade37ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -108,7 +108,24 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-gaming": "nix-gaming", "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"
} }
} }
}, },

View file

@ -8,7 +8,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-gaming = { 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, nixpkgs,
home-manager, home-manager,
nix-gaming, nix-gaming,
rpcs3-latest,
... ...
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
@ -31,6 +36,10 @@
overlays = [customPkgsOverlay]; overlays = [customPkgsOverlay];
}; };
lib = nixpkgs.lib; lib = nixpkgs.lib;
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: {
src = rpcs3-latest;
});
in { in {
nixosConfigurations = { nixosConfigurations = {
nixos = lib.nixosSystem { nixos = lib.nixosSystem {
@ -46,7 +55,7 @@
homeConfigurations = { homeConfigurations = {
"cobray" = home-manager.lib.homeManagerConfiguration { "cobray" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = {inherit inputs;}; extraSpecialArgs = {inherit inputs rpcs3_latest;};
modules = [./home-manager/cobray.nix]; modules = [./home-manager/cobray.nix];
}; };
}; };

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
rpcs3_latest,
...
}: {
imports = [ imports = [
./modules/dunst.nix ./modules/dunst.nix
./modules/fish.nix ./modules/fish.nix
@ -11,7 +15,7 @@
./modules/starship.nix ./modules/starship.nix
./modules/zellij.nix ./modules/zellij.nix
./modules/ffmpeg.nix ./modules/ffmpeg.nix
./modules/emulators.nix (import ./modules/emulators.nix {inherit pkgs rpcs3_latest;})
]; ];
home.username = "cobray"; home.username = "cobray";

View file

@ -1,11 +1,8 @@
{pkgs, ...}: let {
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: { pkgs,
src = builtins.fetchGit { rpcs3_latest,
url = "https://github.com/RPCS3/rpcs3.git"; ...
ref = "master"; }: {
};
});
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
mgba mgba
desmume desmume
@ -17,11 +14,11 @@ in {
retroarch retroarch
mednafen mednafen
joycond 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 if (builtins.tryEval rpcs3_latest).success
then rpcs3_latest then rpcs3_latest
else rpcs3 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)
]; ];
} }