diff --git a/flake.lock b/flake.lock index 1a26d15..a2c2772 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1773418853, - "narHash": "sha256-ELGvz8LW3fEzBTO1FpojRAPqp7+9xs5lspZb9NoZrbY=", + "lastModified": 1772952158, + "narHash": "sha256-RDR+7v1vaojweHI3FdPnuYPy4wRGfTKgeD5GXrXbfT0=", "owner": "nix-community", "repo": "nixos-apple-silicon", - "rev": "2fbdf62451bcd9fc83ca99c56a6e379df8c47c8d", + "rev": "55b7c3c03e9b778d96a71f44400bbdda9a4cfda7", "type": "github" }, "original": { @@ -40,11 +40,11 @@ "cachyos-kernel": { "flake": false, "locked": { - "lastModified": 1773425695, - "narHash": "sha256-O5Fr6f+iS+IVKdB59yqkCaWfkr1SSHD5BLDDlZO7RwU=", + "lastModified": 1772644657, + "narHash": "sha256-7zQSBFv9gFeYhe65NchqLLste7mJ396jA1OnNcf+OQQ=", "owner": "CachyOS", "repo": "linux-cachyos", - "rev": "3b9ae1ae5d4ee95e1509d350b65c0777dde97628", + "rev": "ff5ccc4fa26d5272d929fb9c1838593a6347ca10", "type": "github" }, "original": { @@ -56,11 +56,11 @@ "cachyos-kernel-patches": { "flake": false, "locked": { - "lastModified": 1773430072, - "narHash": "sha256-0X47YCF1CUnLiQ1M6Lh4hc3ax9aV5DX/wCmMfuMyM1o=", + "lastModified": 1772731186, + "narHash": "sha256-y70pS9Cma7+WCsni3VTacHh9g/udulmBS6zrYE2Fz64=", "owner": "CachyOS", "repo": "kernel-patches", - "rev": "ac70453c25200f0a30ad38b3caa63020869f0f8a", + "rev": "eac8168ee15f742547d4d20ba5c7fea283f23019", "type": "github" }, "original": { @@ -183,11 +183,11 @@ ] }, "locked": { - "lastModified": 1773681856, - "narHash": "sha256-+bRqxoFCJFO9ZTFhcCkzNXbDT3b8AEk88fyjB7Is6eo=", + "lastModified": 1773093840, + "narHash": "sha256-u/96NoAyN8BSRuM3ZimGf7vyYgXa3pLx4MYWjokuoH4=", "owner": "nix-community", "repo": "home-manager", - "rev": "57d5560ee92a424fb71fde800acd6ed2c725dfce", + "rev": "bb014746edb2a98d975abde4dd40fa240de4cf86", "type": "github" }, "original": { @@ -269,11 +269,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1773597464, - "narHash": "sha256-3SVrc1AMkY1UE36MD4qvmTkY/ZToK2F55Afut5Qm5F8=", + "lastModified": 1772992385, + "narHash": "sha256-nHFrO9rNXV4p28SPkVcaVM8wds9s6ouivnMELo4fXms=", "owner": "xddxdd", "repo": "nix-cachyos-kernel", - "rev": "30468236d5cdd9cb5dea6e757159e04816439146", + "rev": "c7fac23ec3da662ca8e2fac8ba60076d5e06c6b1", "type": "github" }, "original": { @@ -316,11 +316,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1773610124, - "narHash": "sha256-EpC7ELOKmb+xXaqpK5ZRpJ5g9fxxg6tWny7/rUBfrwk=", + "lastModified": 1772822230, + "narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9fe1300f4360e13f39d6d1d006e54fd5093e9ad5", + "rev": "71caefce12ba78d84fe618cf61644dce01cf3a96", "type": "github" }, "original": { @@ -332,11 +332,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1773646010, - "narHash": "sha256-iYrs97hS7p5u4lQzuNWzuALGIOdkPXvjz7bviiBjUu8=", + "lastModified": 1772963539, + "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b2c2d84341b2afb5647081c1386a80d7a8d8605", + "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", "type": "github" }, "original": { @@ -348,11 +348,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1773563071, - "narHash": "sha256-p4f6smYpck1hw6gYsT2omq01gnlZ1E7HTpssDQ0fP+g=", + "lastModified": 1772963539, + "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1c6f50e5b62030a50799682b6babc9dcc5a271ae", + "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", "type": "github" }, "original": { @@ -362,22 +362,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1770107345, - "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "flake-parts": "flake-parts_2", @@ -408,11 +392,11 @@ "noctalia-qs": "noctalia-qs" }, "locked": { - "lastModified": 1773694650, - "narHash": "sha256-3AhKBhSuHxH9COGAfdZSTWdoJxI9wyI1wiq3DEcS1j8=", + "lastModified": 1773090974, + "narHash": "sha256-D9dpV+/TMVLO34Q/cZADB68OvmDbFt+9ydxyXpFEVjY=", "owner": "noctalia-dev", "repo": "noctalia-shell", - "rev": "b647e385a8e0a02a413a6e584d53e615191276e4", + "rev": "44045fa02045300304b9d1cb0d6c0a9988fc4772", "type": "github" }, "original": { @@ -426,16 +410,14 @@ "nixpkgs": [ "noctalia", "nixpkgs" - ], - "systems": "systems_2", - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1773514555, - "narHash": "sha256-XNmLf4HqUM6/he/eJiHT+Mvxmt7QuwgGU14jB4Ha+pM=", + "lastModified": 1772673824, + "narHash": "sha256-TLHXPoELZA6VeuzC1Zpx+MnSsYzrJs+DSieMgfjAOJc=", "owner": "noctalia-dev", "repo": "noctalia-qs", - "rev": "8aa9d8ce86ef018fb442c585ad7fbb2a15a4f822", + "rev": "f8531192cd09b9ea2e78d18e9cfc9d3dba498690", "type": "github" }, "original": { @@ -452,11 +434,11 @@ ] }, "locked": { - "lastModified": 1773693904, - "narHash": "sha256-4etCbDwnQ5EzdSiflzSistWwDZYqO0t3RVQOw6FcaTI=", + "lastModified": 1773104692, + "narHash": "sha256-Knyv6e1o+W2fqJ/S9dDJxTpOMmnZi6OgN0vdx6tf9Uw=", "owner": "nix-community", "repo": "NUR", - "rev": "fb1b5883b41bd32d27591004478ad8e32ea6ba5f", + "rev": "ed329bf1d83aa3cb2cd5151a4e6fbe7f9fee9ec2", "type": "github" }, "original": { @@ -517,39 +499,6 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1772660329, - "narHash": "sha256-IjU1FxYqm+VDe5qIOxoW+pISBlGvVApRjiw/Y/ttJzY=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "3710e0e1218041bbad640352a0440114b1e10428", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "tt-schemes": { "flake": false, "locked": { diff --git a/packages/gamescope/default.nix b/packages/gamescope/default.nix new file mode 100644 index 0000000..30f39c2 --- /dev/null +++ b/packages/gamescope/default.nix @@ -0,0 +1,28 @@ +{ + gamescope, + fetchFromGitHub, +}: + +let + rev = "9416ca9334da7ff707359e5f6aa65dcfff66aa01"; +in +gamescope.overrideAttrs (oldAttrs: { + version = "unstable-20251206105151-9416ca"; + NIX_CFLAGS_COMPILE = [ "-fno-fast-math" ]; + + src = fetchFromGitHub { + inherit rev; + owner = "ValveSoftware"; + repo = "gamescope"; + fetchSubmodules = true; + hash = "sha256-bZXyNmhLG1ZcD9nNKG/BElp6I57GAwMSqAELu2IZnqA="; + }; + + # Unsure if this bit is necessary, though I guess it's nice to have the version gamescope shows match + postPatch = (oldAttrs.postPatch or "") + '' + substituteInPlace src/meson.build \ + --replace-fail "'git', 'describe', '--always', '--tags', '--dirty=+'" "'echo', '${rev}'" + + patchShebangs default_extras_install.sh + ''; +}) diff --git a/packages/overlay.nix b/packages/overlay.nix index 5346aea..e84f9c9 100644 --- a/packages/overlay.nix +++ b/packages/overlay.nix @@ -1,6 +1,7 @@ final: prev: { spotify-webapp = final.callPackage ./spotify-webapp { }; bibata-cursor = final.callPackage ./bibata-cursor { }; + gamescope-unstable = final.callPackage ./gamescope { }; openmw-unstable = prev.openmw.overrideAttrs (oldAttrs: { pname = "openmw"; diff --git a/system/default.nix b/system/default.nix index e6a4f03..262f886 100755 --- a/system/default.nix +++ b/system/default.nix @@ -51,6 +51,7 @@ programs = { gamescope = { enable = true; + package = pkgs.gamescope-unstable; capSysNice = false; args = [ "--output-width 3840" diff --git a/system/hosts/alien/default.nix b/system/hosts/alien/default.nix index 424e6b6..29a7332 100644 --- a/system/hosts/alien/default.nix +++ b/system/hosts/alien/default.nix @@ -8,6 +8,7 @@ environment.systemPackages = with pkgs; [ ddcutil mangohud + (bottles.override { removeWarningPopup = true; }) openrgb ]; @@ -70,6 +71,11 @@ virtualisation.hypervGuest.enable = true; boot.blacklistedKernelModules = [ "hyperv_fb" ]; + boot.binfmt.emulatedSystems = [ + "aarch64-linux" + "riscv64-linux" + ]; + # i don't even remember what this does or why i added it systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" diff --git a/system/widevine/default.nix b/system/widevine/default.nix index 33e32da..df1aa78 100644 --- a/system/widevine/default.nix +++ b/system/widevine/default.nix @@ -7,42 +7,29 @@ }: { nixpkgs.overlays = lib.mkIf (config.nixpkgs.hostPlatform.isLinux) [ - ( - final: prev: - let - # Determine the correct directory name based on the system architecture - archDir = - if final.stdenv.hostPlatform.isAarch64 then - "linux_arm64" - else if final.stdenv.hostPlatform.isx86_64 then - "linux_x64" - else - throw "Unsupported architecture for Widevine CDM"; - in - { - wrapFirefox = - browser: opts: - let - extraPrefs = (opts.extraPrefs or "") + '' - lockPref("media.gmp-widevinecdm.version", "system-installed"); - lockPref("media.gmp-widevinecdm.visible", true); - lockPref("media.gmp-widevinecdm.enabled", true); - lockPref("media.gmp-widevinecdm.autoupdate", false); - lockPref("media.eme.enabled", true); - lockPref("media.eme.encrypted-media-encryption-scheme.enabled", true); - ''; - widevineCdmDir = "${final.widevine-cdm}/share/google/chrome/WidevineCdm"; - widevineOutDir = "$out/gmp-widevinecdm/system-installed"; - in - (prev.wrapFirefox browser (opts // { inherit extraPrefs; })).overrideAttrs (previousAttrs: { - buildCommand = previousAttrs.buildCommand + '' - mkdir -p "${widevineOutDir}" - ln -s "${widevineCdmDir}/_platform_specific/${archDir}/libwidevinecdm.so" "${widevineOutDir}/libwidevinecdm.so" - ln -s "${widevineCdmDir}/manifest.json" "${widevineOutDir}/manifest.json" - wrapProgram "$oldExe" --set MOZ_GMP_PATH "${widevineOutDir}" - ''; - }); - } - ) + (final: prev: { + wrapFirefox = + browser: opts: + let + extraPrefs = (opts.extraPrefs or "") + '' + lockPref("media.gmp-widevinecdm.version", "system-installed"); + lockPref("media.gmp-widevinecdm.visible", true); + lockPref("media.gmp-widevinecdm.enabled", true); + lockPref("media.gmp-widevinecdm.autoupdate", false); + lockPref("media.eme.enabled", true); + lockPref("media.eme.encrypted-media-encryption-scheme.enabled", true); + ''; + widevineCdmDir = "${final.widevine-cdm}/share/google/chrome/WidevineCdm"; + widevineOutDir = "$out/gmp-widevinecdm/system-installed"; + in + (prev.wrapFirefox browser (opts // { inherit extraPrefs; })).overrideAttrs (previousAttrs: { + buildCommand = previousAttrs.buildCommand + '' + mkdir -p "${widevineOutDir}" + ln -s "${widevineCdmDir}/_platform_specific/linux_arm64/libwidevinecdm.so" "${widevineOutDir}/libwidevinecdm.so" + ln -s "${widevineCdmDir}/manifest.json" "${widevineOutDir}/manifest.json" + wrapProgram "$oldExe" --set MOZ_GMP_PATH "${widevineOutDir}" + ''; + }); + }) ]; }