Linux kernel: Difference between revisions

imported>Khoi
No edit summary
imported>MakiseKurisu
Line 350: Line 350:
   options yourmodulename optionA=valueA optionB=valueB
   options yourmodulename optionA=valueA optionB=valueB
'';
'';
</syntaxHighlight>
If you have developed a Nix package for your module, and want to only add the module to your <code>configuration.nix</code> instead of complete rebuilding the system based on your local <code>nixpkgs</code>, you need to update <code>boot.kernelPackages</code> as well, so kernel and modules can match each other:
<syntaxHighlight lang=nix>
{
  boot = {
    kernelPackages = pkgs.wip.linuxPackages;
    extraModulePackages = with config.boot.kernelPackages; [ ch9344 ];
  }
  nixpkgs.config = {
    # Allow unfree modules
    allowUnfree = true;
    packageOverrides = pkgs: {
      wip = import (fetchGit { url = "/home/user/nixpkgs"; shallow = true;}) {
        config = config.nixpkgs.config;
      };
    };
  };
};
</syntaxHighlight>
</syntaxHighlight>