diff --git a/configs/common.nix b/configs/common.nix index 541d66c..75ccaee 100644 --- a/configs/common.nix +++ b/configs/common.nix @@ -23,9 +23,11 @@ config = { allowUnfree = true; packageOverrides = pkgs: { - unstable = - import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") - { }; + unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") { + config = { + allowUnfree = true; + }; + }; }; }; }; diff --git a/configs/configuration-pc.nix b/configs/configuration-pc.nix index 6516790..5b30f73 100644 --- a/configs/configuration-pc.nix +++ b/configs/configuration-pc.nix @@ -28,15 +28,12 @@ hardware.graphics = { enable = true; enable32Bit = true; - extraPackages = with pkgs; [ - # This is the most critical package for AMD OpenCL - rocmPackages.clr.icd - ]; }; + hardware.amdgpu.opencl.enable = true; + boot.kernelParams = [ - "amdgpu.noretry=0" - "amdgpu.gpu_recovery=1" + "amdgpu.ppfeaturemask=0xffffffff" ]; # Wake on Lan diff --git a/flake.lock b/flake.lock index 987c80f..f288731 100644 --- a/flake.lock +++ b/flake.lock @@ -131,6 +131,22 @@ "type": "github" } }, + "mesa-davinci": { + "locked": { + "lastModified": 1754501210, + "narHash": "sha256-ahTHrGs72TLVcNUR2VHckEx+t6frke0e/Ptk6AaEINk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "599ddd2b79331c1e6153e1659bdaab65d62c4c82", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "599ddd2b79331c1e6153e1659bdaab65d62c4c82", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1770197578, @@ -250,6 +266,7 @@ "doot": "doot", "elephant": "elephant", "hyprfloat": "hyprfloat", + "mesa-davinci": "mesa-davinci", "nixpkgs": "nixpkgs_4", "walker": "walker", "way-edges": "way-edges" diff --git a/flake.nix b/flake.nix index 4f95a18..7f2fcb6 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,8 @@ url = "github:abenz1267/walker"; inputs.elephant.follows = "elephant"; }; + + mesa-davinci.url = "github:nixos/nixpkgs?ref=599ddd2b79331c1e6153e1659bdaab65d62c4c82"; }; outputs = diff --git a/modules/davinci/davinci.nix b/modules/davinci/davinci.nix index a1ccedd..239be63 100644 --- a/modules/davinci/davinci.nix +++ b/modules/davinci/davinci.nix @@ -2,12 +2,22 @@ # Even if following this guide https://www.reddit.com/r/LinuxCrackSupport/comments/1nfqhld/davinci_resolve_studio_202_fix_linux_crack_guide/ # nixpkgs rev used for this tests: 4652ba995a945108fb891191c1e910b9a6ed9064 -{ lib, pkgs, ... }: +{ lib, inputs, ... }: let + mesa-good-pkg = inputs.mesa-davinci.legacyPackages.x86_64-linux.mesa; pkgs = import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/4652ba995a945108fb891191c1e910b9a6ed9064.tar.gz"; - sha256 = "sha256:1pmmbasd84z3yi06919jnl9gvpm37cfr30rba3mc8mgig8ansfhf"; # You can find this using nix-prefetch-url + url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz"; }) { config.allowUnfree = true; }; + pkgs-pinned = + import + (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/497ee3c70707fd71b45c37d48ae1d45e79751047.tar.gz"; + }) + { + config = { + allowUnfree = true; + }; + }; ffmpeg-encoder-plugin = pkgs.stdenv.mkDerivation (finalAttrs: { pname = "ffmpeg-encoder-plugin"; version = "1.2.1"; @@ -38,7 +48,7 @@ let davinci-resolve-studio-cracked = let - davinci-patched = pkgs.davinci-resolve-studio.davinci.overrideAttrs (old: { + davinci-patched = pkgs-pinned.davinci-resolve-studio.davinci.overrideAttrs (old: { # script based on https://www.reddit.com/r/LinuxCrackSupport/comments/1nfqhld/davinci_resolve_studio_202_fix_linux_crack_guide/ # # Additionally, it will install ffmpeg_encoder_plugin to enable H264/5 & AV1 exports: @@ -122,7 +132,10 @@ let libGL libGLU ] - ++ [ davinci-patched ]; + ++ [ + mesa-good-pkg + davinci-patched + ]; extraPreBwrapCmds = '' mkdir -p ~/.local/share/DaVinciResolve/Extras || exit 1 @@ -183,9 +196,4 @@ let in { environment.systemPackages = [ davinci-resolve-studio-cracked ]; - - # following configuration was taken from - # https://wiki.nixos.org/wiki/DaVinci_Resolve - - # Zynix }