[Nix-dev] Fwd: Nix OS installation problems - Where's the hard drive?
Joseph Joe
joej at reed.edu
Fri Oct 10 17:31:16 CEST 2014
I also have a working NixOS on a laptop now (The live-usb recognized
this harddrive).
I added the kernelConfig parameter in my configuration.nix file (attached),
but
there are build errors. Specifically, after running nixos-rebuild
switch, it ends with the following output:
GOT:
GOT: #
GOT: # configuration written to .config
GOT: #
building config
GOT: make: Leaving directory
`/tmp/nix-build-linux-config-3.12.28.drv-0/linux-3.12.28'
unused option: CONFIG_SCSI_SAS_ATA
builder for
`/nix/store/0xynni7sbs8ck8p7cri356ryn3dfifqp-linux-config-3.12.28.drv'
failed with exit code 255
cannot build derivation
`/nix/store/5fl9127mvpvjswhlsj02lzvs121ha98m-linux-3.12.28.drv': 1
dependencies couldn't be built
cannot build derivation
`/nix/store/niq6zlss38cqyg28mkqx42d214kfm2vh-nixos-14.04.519.b9bde98.drv':
1 dependencies couldn't be built
error: build of
`/nix/store/niq6zlss38cqyg28mkqx42d214kfm2vh-nixos-14.04.519.b9bde98.drv'
failed
Is there an error in my configuration file?
Also, for creating an iso out of a NixOS configuration, I need to run
these commands:
(https://nixos.org/wiki/Creating_a_NixOS_live_CD)
export NIX_PATH=$NIXREPOS
nix-build -A iso_graphical.x86_64-linux $NIXREPOS/nixos/release.nix
But, there is no file release.nix on my computer.
On 10/7/14, Wout Mertens <wout.mertens at gmail.com> wrote:
> On Tue, Oct 7, 2014 at 4:49 AM, Joseph Joe <joej at 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141010/7fae069a/attachment.html
-------------- next part --------------
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nixpkgs.config.packageOverrides = pkgs: {
stdenv = pkgs.stdenv // {
platform = pkgs.stdenv.platform // {
kernelExtraConfig = "CONFIG_SCSI_SAS_ATA y" ;
};
};
};
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda";
# networking.hostName = "nixos"; # Define your hostname.
networking.wireless.enable = true; # Enables wireless.
# Select internationalisation properties.
# i18n = {
# consoleFont = "lat9w-16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# List packages installed in system profile. To search by name, run:
# -env -qaP | grep wget
# environment.systemPackages = with pkgs; [
# wget
# ];
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable the KDE Desktop Environment.
services.xserver.displayManager.kdm.enable = true;
services.xserver.desktopManager.kde4.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
# users.extraUsers.guest = {
# name = "guest";
# group = "users";
# uid = 1000;
# createHome = true;
# home = "/home/guest";
# shell = "/run/current-system/sw/bin/bash";
# };
}
More information about the nix-dev
mailing list