[Nix-dev] Switching the default kernel in configuration.nix
Tony White
tonywhite100 at googlemail.com
Fri Apr 10 21:26:34 CEST 2009
I'd like to learn how to switch the default kernel from 2.6.25 please.
I've tried changing the option in configuration.nix but without
success. I think I'm missing something but can't see what.
Here's configuration.nix :
{pkgs, config, ...}:
{
time = {
timeZone = "Europe/London";
};
boot = {
grubDevice = [ "/dev/sdb1" ];
extraKernelParams = [
"vga=intelfb:1024x768-32 at 60"
"mem=1024M" # The machine suffers from a memory allocation bug
"lapic" ];
resumeDevice = [ "13:19" ];
# Device for manual resume attempt during boot. Looks like
# major:minor. ls -l /dev/SWAP_PARTION shows them.
# kernelPackages = [ pkgs.kernelPackages_2_6_28 ];
configurationName = [ "NixOS" ];
initrd = {
extraKernelModules = [
"ata_piix" "uhci_hcd" "ehci_hcd" "usb_storage" "acpi_cpufreq" "ext3"
"intelfb" "asus_laptop" "shpchp" "pci_hotplug" "dm_mod" "jbd"
"ide_generic" "ide_disk"
"ide_core" "sr_mod" "sd_mod" "scsi_wait_scan" "usbhid" "ohci_hcd"
"usbcore" "scsi_transport_spi" "ahci" "libata" "scsi_mod" ];
kernelModules = [];
};
};
fileSystems = [
{ mountPoint = "/";
device = "/dev/sdb1";
label = "nixos";
fsType = "ext3";
options = "data=journal,noatime";
}
{ mountPoint = "/media/sda2";
device = "/dev/sda2";
fsType = "ext3";
options = "noatime";
}
{ mountPoint = "/media/sda3";
device = "/dev/sda3";
label = "WORKAREA";
fsType = "vfat";
}
{ mountPoint = "/media/sda4";
device = "/dev/sda4";
label = "WINDOWS";
fsType = "vfat";
} ];
swapDevices = [
{ label = "swap";
device = "/dev/sda1";
} ];
nix = {
# This option defines the maximum number of jobs that Nix will try
# to build in parallel. The default is 1. You should generally
# set it to the number of CPUs in your system (e.g., 2 on a Athlon
# 64 X2).
maxJobs = 1;
};
networking = {
hostName = "m3n";
};
services = {
xserver = {
# This needs serious revision by me because there are so many options to set.
enable = true;
autorun = true;
exportConfiguration = true;
videoDriver = "i810";
resolutions = [{x = 1024; y = 768;} {x = 800; y = 600;} {x = 640; y = 480;}];
driSupport = true;
sessionType = "kde4";
isClone = false;
layout = "gb";
xkbModel = "pc105";
xkbOptions = "compose:rwin";
synaptics = {
enable = true;
};
};
udev = {
# Warning: setting this option requires acceptance of the firmware
# license, see http://ipw2100.sourceforge.net/firmware.php?fid=4.
addFirmware = [ pkgs.ipw2100fw ];
};
};
#sudo = {
# enable = true;
# configFile = "
# WARNING: do not edit this file directly or with \"visudo\". Instead,
# edit the source file in /etc/nixos/nixos/etc/sudoers.
# \"root\" is allowed to do anything.
#root ALL=(ALL) SETENV: ALL
# Users in the \"wheel\" group can do anything.
#%wheel ALL=(ALL) SETENV: ALL
# ";
# };
users = {
extraUsers = [
{ name = "tony";
uid = 500;
description = "Tony";
home = "/home/tony";
createHome = true;
group = "tony";
extraGroups = [ "users" "wheel" ];
shell = "/bin/sh";
}
];
extraGroups = [
{ name = "tony";
gid = 500;
}
];
};
i18n = {
defaultLocale = "en_GB.UTF-8";
# consoleFont = "lat9w-16";
consoleKeyMap = "uk";
};
powerManagement = {
enable = true;
};
}
I've hashed out the sudo section too because I can't seem to be able
to set that correctly either.
Any help would be greatly appreciated because I intend to compile
kernels quite frequently, So being able to switch between each one and
the default one would help a bit.
Many thanks,
Tony
More information about the nix-dev
mailing list