GithubHelp home page GithubHelp logo

nvidia-patch-nixos's Introduction

nvidia-patch-nixos

nvidia-patch flake for NixOS

Usage

  • Add this flake to your flake inputs:

    nvidia-patch.url = "github:icewind1991/nvidia-patch-nixos";  
    nvidia-patch.inputs.nixpkgs.follows = "nixpkgs";
    
  • Apply the overlay:

    nixpkgs.overlays = [inputs.nvidia-patch.overlay];
    
  • Apply the patch to your nvidia package

    {
      pkgs,
      config,
      ...
    }: let
      rev = "af2616a252c990a8435bf86cf4788ce435474e24"; # revision from https://github.com/keylase/nvidia-patch to use
      hash = "sha256-yocxfo7YvBCpHVV/ZhNQssyd3L9jvMFP7tz0cQucLr4="; # sha256sum for https://github.com/keylase/nvidia-patch at the specified revision
      
      # create patch functions for the specified revision
      nvidia-patch = pkgs.nvidia-patch rev hash;
    
      # nvidia package to patch
      package = config.boot.kernelPackages.nvidiaPackages.stable;
    in {
      hardware.nvidia.package = nvidia-patch.patch-nvenc (nvidia-patch.patch-fbc package);
    }

nvidia-patch-nixos's People

Contributors

icewind1991 avatar pizzaandcheese avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pizzaandcheese

nvidia-patch-nixos's Issues

Stable driver version 545.29.02 missing on upgrade to NixOS 23.11

Any idea what's wrong here? This version seems to be supported by nvidia-patch (listed in the table).

NixOS config:

let
  # https://github.com/keylase/nvidia-patch commit hash
  rev = "c56db4a52079eff46c207975aae6ef4704223aff";
  hash = "sha256-9ME98jj/8EPEX/tia8drtLwO/Dea7wuptIveyl5uwsk=";
  patch = pkgs.nvidia-patch rev hash;

  # Nvidia package to patch.
  # See: https://nixos.wiki/wiki/Nvidia
  nvidia-package = config.boot.kernelPackages.nvidiaPackages.stable;
in
{
  nixpkgs = {
    overlays = [ nvidia-patch.overlay ];
  };
  hardware.nvidia = {
    package = patch.patch-nvenc nvidia-package;
  };
}

Full output of nixos-rebuild test:

warning: Git tree '/home/aksiksi/nixos-config' is dirty
error:
       … while calling the 'head' builtin

         at /nix/store/7i525k013ds687vgp12lyhwmx79qd4qj-source/lib/attrsets.nix:850:11:

          849|         || pred here (elemAt values 1) (head values) then
          850|           head values
             |           ^
          851|         else

       … while evaluating the attribute 'value'

         at /nix/store/7i525k013ds687vgp12lyhwmx79qd4qj-source/lib/modules.nix:807:9:

          806|     in warnDeprecation opt //
          807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          808|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute '"545.29.02"' missing

       at /nix/store/1lf81p5na9y5nyxvgkx4j8ai46fxa3am-source/flake.nix:39:24:

           38|               patch = patchList.${version};
           39|               object = objectList.${version};
             |                        ^
           40|             in {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.