[Nix-dev] Hi nix developers!

Marc Weber marco-oweber at gmx.de
Sat Apr 4 21:49:40 CEST 2009


> {
>   boot = {
>     extraKernelParams = [
>       "mem=1024M" # The machine suffers from a memory allocation bug
>     ];
>   };
> }
> 
> (IMO) This way of writing is a bit annoying and we should probably
> look at removing the "extra***" options by replacing the default
> kernel parameters by extra options with default values.

I don't think I got how it should look like. Do you think about this
design:

 boot = {
   defaultKernelParams = mkOption {
    default = [ default1 default2 ];
    description = "
      default set of kernel parameters. You probably only
      want to touch these in very rare circumstances..
      "
   }

   kernelParams = mkOption {
    description = "
      add additional custom kernel parameters
    ";

    mergeFun = listMerge;
   };

... in ..
 
{ ..
  kernelParams = cfg.defaultKernelParams; # add default kernel params to
  
}

So instead of
kernelParams ++ extraKernelParams  (*) you  finally have

defaultKernelParams ++ kernelParams (*)

(*) this last concatenation item is meant to be edited by user.

Did I get your intention right? (the extra* is gone for the default user setup)

Sincerly
Marc Weber



More information about the nix-dev mailing list