Making the fuloong2f system-tarball more specific for the fuloong, so, helping in how
to use the system more easily. svn path=/nixos/branches/stdenv-updates/; revision=23826
This commit is contained in:
parent
3b216865d2
commit
743b75fbaf
|
@ -17,9 +17,11 @@ let
|
||||||
{
|
{
|
||||||
require = [ ];
|
require = [ ];
|
||||||
|
|
||||||
# Add your own options below and run "nixos-rebuild switch".
|
# Add your own options below
|
||||||
# E.g.,
|
# E.g.,
|
||||||
# services.openssh.enable = true;
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.platform = pkgs.platforms.fuloong2f_n32;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -35,6 +37,20 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# A clue for the kernel loading
|
||||||
|
kernelParams = pkgs.writeText "kernel-params.txt" ''
|
||||||
|
Kernel Parameters:
|
||||||
|
init=/boot/init systemConfig=/boot/init ${toString config.boot.kernelParams}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# System wide nixpkgs config
|
||||||
|
nixpkgsUserConfig = pkgs.writeText "config.nix" ''
|
||||||
|
pkgs:
|
||||||
|
{
|
||||||
|
platform = pkgs.platforms.fuloong2f_n32;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -101,6 +117,7 @@ in
|
||||||
[ "vfat" "reiserfs" ];
|
[ "vfat" "reiserfs" ];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_2_6_35;
|
boot.kernelPackages = pkgs.linuxPackages_2_6_35;
|
||||||
|
boot.kernelParams = [ "console=tty" ];
|
||||||
|
|
||||||
boot.initrd.kernelModules =
|
boot.initrd.kernelModules =
|
||||||
[ # Wait for SCSI devices to appear.
|
[ # Wait for SCSI devices to appear.
|
||||||
|
@ -131,7 +148,29 @@ in
|
||||||
|
|
||||||
# To speed up further installation of packages, include the complete stdenv
|
# To speed up further installation of packages, include the complete stdenv
|
||||||
# in the Nix store of the tarball.
|
# in the Nix store of the tarball.
|
||||||
tarball.storeContents = pkgs2storeContents [ pkgs.stdenv ];
|
tarball.storeContents = pkgs2storeContents [ pkgs.stdenv ]
|
||||||
|
++ [
|
||||||
|
{
|
||||||
|
object = config.system.build.bootStage2;
|
||||||
|
symlink = "/boot/init";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
object = config.system.build.toplevel;
|
||||||
|
symlink = "/boot/system";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
tarball.contents = [
|
||||||
|
{ source = kernelParams;
|
||||||
|
target = "/kernelparams.txt";
|
||||||
|
}
|
||||||
|
{ source = config.boot.kernelPackages.kernel + config.system.boot.loader.kernelFile;
|
||||||
|
target = "/boot/vmlinux";
|
||||||
|
}
|
||||||
|
{ source = nixpkgsUserConfig;
|
||||||
|
target = "/root/.nixpkgs/config.nix";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Allow sshd to be started manually through "start sshd". It should
|
# Allow sshd to be started manually through "start sshd". It should
|
||||||
# not be started by default on the installation CD because the
|
# not be started by default on the installation CD because the
|
||||||
|
@ -146,6 +185,9 @@ in
|
||||||
boot.loader.generationsDir.enable = false;
|
boot.loader.generationsDir.enable = false;
|
||||||
system.boot.loader.kernelFile = "/vmlinux";
|
system.boot.loader.kernelFile = "/vmlinux";
|
||||||
|
|
||||||
|
# Needed for nixos to evaluate
|
||||||
|
system.build.menuBuilder = "true";
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
platform = pkgs.platforms.fuloong2f_n32;
|
platform = pkgs.platforms.fuloong2f_n32;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue