* Get the CD to build again.
svn path=/nixos/trunk/; revision=7356
This commit is contained in:
parent
57663aae6b
commit
8f21b0119c
@ -189,4 +189,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
name = ["services" "xserver" "enable"];
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether to enable the X server.
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -108,7 +108,7 @@ rec {
|
|||||||
|
|
||||||
# The services (Upstart) configuration for the system.
|
# The services (Upstart) configuration for the system.
|
||||||
upstartJobs = import ./upstart.nix {
|
upstartJobs = import ./upstart.nix {
|
||||||
inherit pkgs nix splashThemes;
|
inherit config pkgs nix splashThemes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{pkgs, nix, splashThemes}:
|
{config, pkgs, nix, splashThemes}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -6,6 +6,9 @@ let
|
|||||||
inherit (pkgs) runCommand;
|
inherit (pkgs) runCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
optional = option: service:
|
||||||
|
if config.get option then [service] else [];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
import ../upstart-jobs/gather.nix {
|
import ../upstart-jobs/gather.nix {
|
||||||
@ -39,22 +42,11 @@ import ../upstart-jobs/gather.nix {
|
|||||||
dhcp = pkgs.dhcpWrapper;
|
dhcp = pkgs.dhcpWrapper;
|
||||||
})
|
})
|
||||||
|
|
||||||
# SSH daemon.
|
|
||||||
(import ../upstart-jobs/sshd.nix {
|
|
||||||
inherit (pkgs) openssh;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Nix daemon - required for multi-user Nix.
|
# Nix daemon - required for multi-user Nix.
|
||||||
(import ../upstart-jobs/nix-daemon.nix {
|
(import ../upstart-jobs/nix-daemon.nix {
|
||||||
inherit nix;
|
inherit nix;
|
||||||
})
|
})
|
||||||
|
|
||||||
# X server.
|
|
||||||
(import ../upstart-jobs/xserver.nix {
|
|
||||||
inherit (pkgs) substituteAll;
|
|
||||||
inherit (pkgs.xorg) xorgserver xf86inputkeyboard xf86inputmouse xf86videovesa;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Transparent TTY backgrounds.
|
# Transparent TTY backgrounds.
|
||||||
(import ../upstart-jobs/tty-backgrounds.nix {
|
(import ../upstart-jobs/tty-backgrounds.nix {
|
||||||
inherit (pkgs) stdenv splashutils;
|
inherit (pkgs) stdenv splashutils;
|
||||||
@ -71,6 +63,19 @@ import ../upstart-jobs/gather.nix {
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# SSH daemon.
|
||||||
|
++ optional ["services" "sshd" "enable"]
|
||||||
|
(import ../upstart-jobs/sshd.nix {
|
||||||
|
inherit (pkgs) openssh;
|
||||||
|
})
|
||||||
|
|
||||||
|
# X server.
|
||||||
|
++ optional ["services" "xserver" "enable"]
|
||||||
|
(import ../upstart-jobs/xserver.nix {
|
||||||
|
inherit (pkgs) substituteAll;
|
||||||
|
inherit (pkgs.xorg) xorgserver xf86inputkeyboard xf86inputmouse xf86videovesa;
|
||||||
|
})
|
||||||
|
|
||||||
# Handles the reboot/halt events.
|
# Handles the reboot/halt events.
|
||||||
++ (map
|
++ (map
|
||||||
(event: makeJob (import ../upstart-jobs/halt.nix {
|
(event: makeJob (import ../upstart-jobs/halt.nix {
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
{stdenv, runCommand, substituteAll, nix}:
|
{ stdenv, runCommand, substituteAll, nix
|
||||||
|
, # URL of the Nixpkgs distribution that the installer will pull.
|
||||||
|
# Leave empty for a pure source distribution.
|
||||||
|
nixpkgsURL ? ""
|
||||||
|
}:
|
||||||
|
|
||||||
substituteAll {
|
substituteAll {
|
||||||
src = ./nixos-installer.sh;
|
src = ./nixos-installer.sh;
|
||||||
dir = "bin";
|
dir = "bin";
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit nix;
|
inherit nix nixpkgsURL;
|
||||||
|
|
||||||
pathsFromGraph = ../helpers/paths-from-graph.sh;
|
pathsFromGraph = ../helpers/paths-from-graph.sh;
|
||||||
|
|
||||||
|
@ -106,8 +106,9 @@ cp /etc/resolv.conf $mountPoint/etc/
|
|||||||
|
|
||||||
|
|
||||||
# Do a nix-pull to speed up building.
|
# Do a nix-pull to speed up building.
|
||||||
nixpkgsURL=http://nix.cs.uu.nl/dist/nix/nixpkgs-0.11pre6984
|
if test -n "@nixpkgsURL@"; then
|
||||||
chroot $mountPoint @nix@/bin/nix-pull $nixpkgsURL/MANIFEST
|
chroot $mountPoint @nix@/bin/nix-pull @nixpkgsURL@/MANIFEST
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Build the specified Nix expression in the target store and install
|
# Build the specified Nix expression in the target store and install
|
||||||
|
@ -1,22 +1,31 @@
|
|||||||
let
|
rec {
|
||||||
|
|
||||||
# The label used to identify the installation CD.
|
|
||||||
cdromLabel = "NIXOS";
|
|
||||||
|
|
||||||
in
|
configuration = {
|
||||||
|
boot = {
|
||||||
# Build boot scripts for the CD that find the CD-ROM automatically.
|
|
||||||
with import ../configuration/boot-environment.nix {
|
|
||||||
autoDetectRootDevice = true;
|
autoDetectRootDevice = true;
|
||||||
rootLabel = cdromLabel;
|
|
||||||
stage2Init = "/init";
|
|
||||||
readOnlyRoot = true;
|
readOnlyRoot = true;
|
||||||
|
# The label used to identify the installation CD.
|
||||||
|
rootLabel = "NIXOS";
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
sshd = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
xserver = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
rec {
|
system = import ../configuration/system.nix {
|
||||||
|
inherit configuration;
|
||||||
|
stage2Init = "/init";
|
||||||
|
};
|
||||||
|
|
||||||
inherit nixosInstaller bootStage1 upstartJobs; # !!! debug
|
|
||||||
|
pkgs = system.pkgs;
|
||||||
|
|
||||||
|
|
||||||
# Since the CD is read-only, the mount points must be on disk.
|
# Since the CD is read-only, the mount points must be on disk.
|
||||||
@ -24,30 +33,34 @@ rec {
|
|||||||
ensureDir $out
|
ensureDir $out
|
||||||
cd $out
|
cd $out
|
||||||
mkdir proc sys tmp etc dev var mnt nix nix/var
|
mkdir proc sys tmp etc dev var mnt nix nix/var
|
||||||
touch $out/${cdromLabel}
|
touch $out/${configuration.boot.rootLabel}
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
# We need a copy of the Nix expressions for Nixpkgs and NixOS on the
|
# We need a copy of the Nix expressions for Nixpkgs and NixOS on the
|
||||||
# CD. We put them in a tarball because accessing that many small
|
# CD. We put them in a tarball because accessing that many small
|
||||||
# files from a slow device like a CD-ROM takes too long.
|
# files from a slow device like a CD-ROM takes too long.
|
||||||
makeTarball = tarName: input: pkgs.runCommand "tarball" "
|
makeTarball = tarName: input: pkgs.runCommand "tarball" {inherit tarName;} "
|
||||||
ensureDir $out
|
ensureDir $out
|
||||||
(cd ${input} && tar cvfj $out/${tarName} . \\
|
(cd ${input} && tar cvfj $out/${tarName} . \\
|
||||||
--exclude '*~' --exclude '.svn' \\
|
--exclude '*~' \\
|
||||||
--exclude 'pkgs' --exclude 'result')
|
--exclude 'pkgs' --exclude 'result')
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
# Put the current directory in the tarball. !!! This gives us a lot
|
# Put the current directory in a tarball (making sure to filter
|
||||||
# of crap (like .svn if this is a working copy). An "svn export"
|
# out crap like the .svn directories).
|
||||||
# would be better, but that's impure.
|
nixosTarball = makeTarball "nixos.tar.bz2" (builtins.filterSource
|
||||||
nixosTarball = makeTarball "nixos.tar.bz2" ./.;
|
(name: let base = baseNameOf (toString name); in base != ".svn" && base != "result") ./..);
|
||||||
|
|
||||||
|
|
||||||
|
# Get a recent copy of Nixpkgs.
|
||||||
|
nixpkgsRel = "nixpkgs-0.11pre7355";
|
||||||
|
nixpkgsURL = http://nix.cs.uu.nl/dist/nix/ + nixpkgsRel;
|
||||||
|
|
||||||
nixpkgsTarball = pkgs.fetchurl {
|
nixpkgsTarball = pkgs.fetchurl {
|
||||||
url = http://nix.cs.uu.nl/dist/nix/nixpkgs-0.11pre7087/nixpkgs-0.11pre7087.tar.bz2;
|
url = nixpkgsURL + "/" + nixpkgsRel + ".tar.bz2";
|
||||||
md5 = "c5840fcd049d75e00ad856ecbbef6857";
|
md5 = "9d3e5e9f6ab64536803abf3f2e1c6056";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -68,7 +81,7 @@ rec {
|
|||||||
{ source = pkgs.kernel + "/vmlinuz";
|
{ source = pkgs.kernel + "/vmlinuz";
|
||||||
target = "isolinux/vmlinuz";
|
target = "isolinux/vmlinuz";
|
||||||
}
|
}
|
||||||
{ source = initialRamdisk + "/initrd";
|
{ source = system.initialRamdisk + "/initrd";
|
||||||
target = "isolinux/initrd";
|
target = "isolinux/initrd";
|
||||||
}
|
}
|
||||||
{ source = cdMountPoints;
|
{ source = cdMountPoints;
|
||||||
@ -82,7 +95,7 @@ rec {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
init = bootStage2;
|
init = system.bootStage2;
|
||||||
|
|
||||||
bootable = true;
|
bootable = true;
|
||||||
bootImage = "isolinux/isolinux.bin";
|
bootImage = "isolinux/isolinux.bin";
|
||||||
|
@ -25,13 +25,13 @@ for ((n = 0; n < ${#ttys[*]}; n++)); do
|
|||||||
|
|
||||||
themeName=$(cd $theme && ls | grep -v default)
|
themeName=$(cd $theme && ls | grep -v default)
|
||||||
|
|
||||||
ln -sf $theme/$themeName $out/$themeName
|
ln -sfn $theme/$themeName $out/$themeName
|
||||||
|
|
||||||
if test -e $out/$tty; then
|
if test -e $out/$tty; then
|
||||||
echo "Multiple themes defined for the same TTY!"
|
echo "Multiple themes defined for the same TTY!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -sf $themeName $out/$tty
|
ln -sfn $themeName $out/$tty
|
||||||
|
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user