[Nix-dev] [NixOS] How does system.requiredKernelConfig work?

Rickard Nilsson rickard.nilsson at telia.com
Mon Jan 7 11:57:54 CET 2013


Hi,

The system.requiredKernelConfig configuration option in NixOS should allow  
one to specify kernel config options a module needs. But how is it  
supposed to work? I'm creating a service for FSCache/CacheFiles (caching  
NFS or CIFS files locally) in NixOS, and then I need the following kernel  
config options:

   FSCACHE m/y
   CACHEFILES m/y
   NFS_FSCACHE y
   CIFS_FSCACHE y

so I specified this:

system.requiredKernelConfig = with config.lib.kernelConfig; [
   (isYes "NFS_FSCACHE")
   (isYes "CIFS_FSCACHE")
   (isEnabled "FSCACHE")
   (isEnabled "CACHEFILES")
];

But Nix neither warns me that NFS_FSCACHE and CIFS_FSCACHE is not enabled  
(in the nixpkgs default config), nor does it enable them. If I add them to  
pkgs/os-specific/linux/kernel/linux-x.x.nix and rebuild the kernel,  
everything works fine, but I don't see the point of the NixOS option?


Best regards,
   Rickard Nilsson


More information about the nix-dev mailing list