On Tue, Oct 7, 2014 at 4:49 AM, Joseph Joe <j...@reed.edu> wrote:

> I am still a bit confused. I added the following lines to
> /etc/nixos/configuration.nix
>
> nixpkgs.config.packageOverrides = pkgs:
>   { linux_3_4 = pkgs.linux_3_4.override {
>       extraConfig =
>         ''
>           CONFIG_SCSI_SAS_ATA y
>         '';
>     };
>   };
>
> Actually this will not work unless you're using linux_3_4 which I think
you're not. The better way is what Alexander linked,

 nixpkgs.config.packageOverrides = pkgs: {
   stdenv = pkgs.stdenv // {
     platform = pkgs.stdenv.platform // {
       kernelExtraConfig = "CONFIG_SCSI_SAS_ATA y" ;
     };
   };
 };

(I didn't test this)


> Then I saved the file and entered the command
>
> # nixos-rebuild switch
>

Like Alexander said, that doesn't activate the new kernel until when you
reboot.


> This doesn't work because I am inside the live-usb. But, I can make a
> custom image in the live-boot with this changed configuration file. This
> image will have the configuration I want. Is that correct?
>

No, the live boot doesn't use the normal boot setup, not sure if
nixos-rebuild did anything there.


> Also, how would I put the Ubuntu kernel onto the liveUSB?
>

IIRC, the liveUSB is simply a FAT32 filesystem with kernel and squashed
root filesystem, so you'd copy the ubuntu kernel on it as well and convince
the boot loader to use it. Anyway, you might have problems with providing
modules.

Here's two other approaches:

   - Take an empty USB stick and install NixOS on that from the liveUSB,
   with the kernelconfig as above. Then boot from that and install nixos on
   your harddisk.
   - Install nixos in-place from your current Linux using the techniques
   discussed in https://github.com/NixOS/nixpkgs/issues/2079 , namely
   install nix as root (or multiuser) on your current linux, then build nixos
   into /nixos and boot using /nixos as the root directory. There's no script
   that does that for you yet though.

Wout.
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to