mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
* Refactoring.
svn path=/nixos/trunk/; revision=7156
This commit is contained in:
parent
0817c307dc
commit
5c89e891df
22 changed files with 31 additions and 31 deletions
|
@ -27,5 +27,5 @@ stdenv.mkDerivation {
|
||||||
# For obtaining the closure of `contents'.
|
# For obtaining the closure of `contents'.
|
||||||
exportReferencesGraph =
|
exportReferencesGraph =
|
||||||
map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents;
|
map (x: [("closure-" + baseNameOf x.symlink) x.object]) contents;
|
||||||
pathsFromGraph = ./paths-from-graph.sh;
|
pathsFromGraph = ../helpers/paths-from-graph.sh;
|
||||||
}
|
}
|
|
@ -8,21 +8,21 @@
|
||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
pkgs = import ./pkgs/top-level/all-packages.nix {inherit system;};
|
pkgs = import ../pkgs/top-level/all-packages.nix {inherit system;};
|
||||||
|
|
||||||
pkgsDiet = import ./pkgs/top-level/all-packages.nix {
|
pkgsDiet = import ../pkgs/top-level/all-packages.nix {
|
||||||
inherit system;
|
inherit system;
|
||||||
bootStdenv = pkgs.useDietLibC pkgs.stdenv;
|
bootStdenv = pkgs.useDietLibC pkgs.stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
pkgsStatic = import ./pkgs/top-level/all-packages.nix {
|
pkgsStatic = import ../pkgs/top-level/all-packages.nix {
|
||||||
inherit system;
|
inherit system;
|
||||||
bootStdenv = pkgs.makeStaticBinaries pkgs.stdenv;
|
bootStdenv = pkgs.makeStaticBinaries pkgs.stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
stdenvLinuxStuff = import ./pkgs/stdenv/linux {
|
stdenvLinuxStuff = import ../pkgs/stdenv/linux {
|
||||||
system = pkgs.stdenv.system;
|
system = pkgs.stdenv.system;
|
||||||
allPackages = import ./pkgs/top-level/all-packages.nix;
|
allPackages = import ../pkgs/top-level/all-packages.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
|
nix = pkgs.nixUnstable; # we need the exportReferencesGraph feature
|
||||||
|
@ -35,7 +35,7 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
# Determine the set of modules that we need to mount the root FS.
|
# Determine the set of modules that we need to mount the root FS.
|
||||||
modulesClosure = import ./modules-closure.nix {
|
modulesClosure = import ../helpers/modules-closure.nix {
|
||||||
inherit (pkgs) stdenv kernel module_init_tools;
|
inherit (pkgs) stdenv kernel module_init_tools;
|
||||||
rootModules = ["ide-cd" "ide-disk" "ide-generic"];
|
rootModules = ["ide-cd" "ide-disk" "ide-generic"];
|
||||||
};
|
};
|
||||||
|
@ -63,7 +63,7 @@ rec {
|
||||||
|
|
||||||
# The init script of boot stage 1 (loading kernel modules for
|
# The init script of boot stage 1 (loading kernel modules for
|
||||||
# mounting the root FS).
|
# mounting the root FS).
|
||||||
bootStage1 = import ./boot-stage-1.nix {
|
bootStage1 = import ../boot/boot-stage-1.nix {
|
||||||
inherit (pkgs) genericSubstituter;
|
inherit (pkgs) genericSubstituter;
|
||||||
inherit (pkgsDiet) module_init_tools;
|
inherit (pkgsDiet) module_init_tools;
|
||||||
inherit extraUtils;
|
inherit extraUtils;
|
||||||
|
@ -77,7 +77,7 @@ rec {
|
||||||
|
|
||||||
# The closure of the init script of boot stage 1 is what we put in
|
# The closure of the init script of boot stage 1 is what we put in
|
||||||
# the initial RAM disk.
|
# the initial RAM disk.
|
||||||
initialRamdisk = import ./make-initrd.nix {
|
initialRamdisk = import ../boot/make-initrd.nix {
|
||||||
inherit (pkgs) stdenv cpio;
|
inherit (pkgs) stdenv cpio;
|
||||||
contents = [
|
contents = [
|
||||||
{ object = bootStage1;
|
{ object = bootStage1;
|
||||||
|
@ -87,7 +87,7 @@ rec {
|
||||||
suffix = "/bin/splash_helper";
|
suffix = "/bin/splash_helper";
|
||||||
symlink = "/sbin/splash_helper";
|
symlink = "/sbin/splash_helper";
|
||||||
}
|
}
|
||||||
{ object = import ./helpers/unpack-theme.nix {
|
{ object = import ../helpers/unpack-theme.nix {
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
theme = splashThemes.splashScreen;
|
theme = splashThemes.splashScreen;
|
||||||
};
|
};
|
||||||
|
@ -98,7 +98,7 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
# The installer.
|
# The installer.
|
||||||
nixosInstaller = import ./installer.nix {
|
nixosInstaller = import ../installer/nixos-installer.nix {
|
||||||
inherit (pkgs) stdenv genericSubstituter;
|
inherit (pkgs) stdenv genericSubstituter;
|
||||||
inherit nix;
|
inherit nix;
|
||||||
shell = pkgs.bash + "/bin/sh";
|
shell = pkgs.bash + "/bin/sh";
|
||||||
|
@ -106,54 +106,54 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
# The services (Upstart) configuration for the system.
|
# The services (Upstart) configuration for the system.
|
||||||
upstartJobs = import ./upstart-jobs/gather.nix {
|
upstartJobs = import ../upstart-jobs/gather.nix {
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
|
|
||||||
jobs = map makeJob [
|
jobs = map makeJob [
|
||||||
# Syslogd.
|
# Syslogd.
|
||||||
(import ./upstart-jobs/syslogd.nix {
|
(import ../upstart-jobs/syslogd.nix {
|
||||||
inherit (pkgs) sysklogd;
|
inherit (pkgs) sysklogd;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Hardware scan; loads modules for PCI devices.
|
# Hardware scan; loads modules for PCI devices.
|
||||||
(import ./upstart-jobs/hardware-scan.nix {
|
(import ../upstart-jobs/hardware-scan.nix {
|
||||||
inherit (pkgs) kernel module_init_tools;
|
inherit (pkgs) kernel module_init_tools;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Network interfaces.
|
# Network interfaces.
|
||||||
(import ./upstart-jobs/network-interfaces.nix {
|
(import ../upstart-jobs/network-interfaces.nix {
|
||||||
inherit (pkgs) nettools kernel module_init_tools;
|
inherit (pkgs) nettools kernel module_init_tools;
|
||||||
})
|
})
|
||||||
|
|
||||||
# DHCP client.
|
# DHCP client.
|
||||||
(import ./upstart-jobs/dhclient.nix {
|
(import ../upstart-jobs/dhclient.nix {
|
||||||
dhcp = pkgs.dhcpWrapper;
|
dhcp = pkgs.dhcpWrapper;
|
||||||
})
|
})
|
||||||
|
|
||||||
# SSH daemon.
|
# SSH daemon.
|
||||||
(import ./upstart-jobs/sshd.nix {
|
(import ../upstart-jobs/sshd.nix {
|
||||||
inherit (pkgs) openssh;
|
inherit (pkgs) openssh;
|
||||||
})
|
})
|
||||||
|
|
||||||
# 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;
|
||||||
backgrounds = splashThemes.ttyBackgrounds;
|
backgrounds = splashThemes.ttyBackgrounds;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Handles the maintenance/stalled event (single-user shell).
|
# Handles the maintenance/stalled event (single-user shell).
|
||||||
(import ./upstart-jobs/maintenance-shell.nix {
|
(import ../upstart-jobs/maintenance-shell.nix {
|
||||||
inherit (pkgs) bash;
|
inherit (pkgs) bash;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Ctrl-alt-delete action.
|
# Ctrl-alt-delete action.
|
||||||
(import ./upstart-jobs/ctrl-alt-delete.nix)
|
(import ../upstart-jobs/ctrl-alt-delete.nix)
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# 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 {
|
||||||
inherit (pkgs) bash;
|
inherit (pkgs) bash;
|
||||||
inherit event;
|
inherit event;
|
||||||
}))
|
}))
|
||||||
|
@ -162,7 +162,7 @@ rec {
|
||||||
|
|
||||||
# The terminals on ttyX.
|
# The terminals on ttyX.
|
||||||
++ (map
|
++ (map
|
||||||
(ttyNumber: makeJob (import ./upstart-jobs/mingetty.nix {
|
(ttyNumber: makeJob (import ../upstart-jobs/mingetty.nix {
|
||||||
mingetty = pkgs.mingettyWrapper;
|
mingetty = pkgs.mingettyWrapper;
|
||||||
inherit ttyNumber;
|
inherit ttyNumber;
|
||||||
}))
|
}))
|
||||||
|
@ -174,14 +174,14 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
makeJob = import ./upstart-jobs/make-job.nix {
|
makeJob = import ../upstart-jobs/make-job.nix {
|
||||||
inherit (pkgs) stdenv;
|
inherit (pkgs) stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# The init script of boot stage 2, which is supposed to do
|
# The init script of boot stage 2, which is supposed to do
|
||||||
# everything else to bring up the system.
|
# everything else to bring up the system.
|
||||||
bootStage2 = import ./boot-stage-2.nix {
|
bootStage2 = import ../boot/boot-stage-2.nix {
|
||||||
inherit (pkgs) genericSubstituter coreutils findutils
|
inherit (pkgs) genericSubstituter coreutils findutils
|
||||||
utillinux kernel udev upstart;
|
utillinux kernel udev upstart;
|
||||||
inherit upstartJobs;
|
inherit upstartJobs;
|
||||||
|
@ -222,7 +222,7 @@ rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
lib = import ./pkgs/lib;
|
lib = pkgs.library;
|
||||||
|
|
||||||
|
|
||||||
config = rec {
|
config = rec {
|
|
@ -46,7 +46,7 @@ rec {
|
||||||
|
|
||||||
|
|
||||||
grubMenuBuilder = pkgs.genericSubstituter {
|
grubMenuBuilder = pkgs.genericSubstituter {
|
||||||
src = ./grub-menu-builder.sh;
|
src = ../installer/grub-menu-builder.sh;
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit (pkgs) bash;
|
inherit (pkgs) bash;
|
||||||
};
|
};
|
|
@ -2,12 +2,12 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
genericSubstituter {
|
genericSubstituter {
|
||||||
src = ./installer.sh;
|
src = ./nixos-installer.sh;
|
||||||
dir = "bin";
|
dir = "bin";
|
||||||
isExecutable = true;
|
isExecutable = true;
|
||||||
inherit shell nix;
|
inherit shell nix;
|
||||||
|
|
||||||
pathsFromGraph = ./paths-from-graph.sh;
|
pathsFromGraph = ../helpers/paths-from-graph.sh;
|
||||||
|
|
||||||
nixClosure = stdenv.mkDerivation {
|
nixClosure = stdenv.mkDerivation {
|
||||||
name = "closure";
|
name = "closure";
|
|
@ -6,7 +6,7 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
# Build boot scripts for the CD that find the CD-ROM automatically.
|
# Build boot scripts for the CD that find the CD-ROM automatically.
|
||||||
with import ./boot-environment.nix {
|
with import ../configuration/boot-environment.nix {
|
||||||
autoDetectRootDevice = true;
|
autoDetectRootDevice = true;
|
||||||
rootLabel = cdromLabel;
|
rootLabel = cdromLabel;
|
||||||
stage2Init = "/init";
|
stage2Init = "/init";
|
||||||
|
@ -63,7 +63,7 @@ rec {
|
||||||
# Create an ISO image containing the isolinux boot loader, the
|
# Create an ISO image containing the isolinux boot loader, the
|
||||||
# kernel, the initrd produced above, and the closure of the stage 2
|
# kernel, the initrd produced above, and the closure of the stage 2
|
||||||
# init.
|
# init.
|
||||||
rescueCD = import ./make-iso9660-image.nix {
|
rescueCD = import ../helpers/make-iso9660-image.nix {
|
||||||
inherit (pkgs) stdenv cdrtools;
|
inherit (pkgs) stdenv cdrtools;
|
||||||
isoName = "nixos.iso";
|
isoName = "nixos.iso";
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ rec {
|
||||||
{ source = pkgs.syslinux + "/lib/syslinux/isolinux.bin";
|
{ source = pkgs.syslinux + "/lib/syslinux/isolinux.bin";
|
||||||
target = "isolinux/isolinux.bin";
|
target = "isolinux/isolinux.bin";
|
||||||
}
|
}
|
||||||
{ source = ./isolinux.cfg;
|
{ source = ../helpers/isolinux.cfg;
|
||||||
target = "isolinux/isolinux.cfg";
|
target = "isolinux/isolinux.cfg";
|
||||||
}
|
}
|
||||||
{ source = pkgs.kernel + "/vmlinuz";
|
{ source = pkgs.kernel + "/vmlinuz";
|
Loading…
Add table
Add a link
Reference in a new issue