mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
f2780fdc62
for building parts of the system. E.g. $ nix-build /etc/nixos/nixos -A upstartJobs.xserver to build the Upstart job for the X server, or $ nix-build /etc/nixos/nixos -A kernel to build the NixOS kernel. * /etc/profile.sh: if ~/.nix-defexpr doesn't exist yet, create it as a directory and add links to root's channels, /etc/nixos/nixos and /etc/nixos/install-source.nix (as "nixpkgs_sys"). * boot.useKernel -> boot.kernel. svn path=/nixos/trunk/; revision=9334
40 lines
943 B
Nix
40 lines
943 B
Nix
let
|
|
|
|
configFileName =
|
|
let env = builtins.getEnv "NIXOS_CONFIG"; in
|
|
if env == "" then /etc/nixos/configuration.nix else env;
|
|
|
|
system = import system/system.nix {configuration = import configFileName;};
|
|
|
|
in
|
|
|
|
{ inherit (system)
|
|
activateConfiguration
|
|
bootStage1
|
|
bootStage2
|
|
etc
|
|
extraUtils
|
|
grubMenuBuilder
|
|
initialRamdisk
|
|
kernel
|
|
nix
|
|
nixosCheckout
|
|
nixosInstall
|
|
nixosRebuild
|
|
system
|
|
systemPath
|
|
config
|
|
;
|
|
|
|
manifests = system.config.get ["installer" "manifests"]; # exported here because nixos-rebuild uses it
|
|
|
|
upstartJobsCombined = system.upstartJobs;
|
|
|
|
# Make it easier to build individual Upstart jobs (e.g., "nix-build
|
|
# /etc/nixos/nixos -A upstartJobs.xserver").
|
|
upstartJobs = { recurseForDerivations = true; } //
|
|
builtins.listToAttrs (map (job:
|
|
{ attr = if job ? jobName then job.jobName else job.name; value = job; }
|
|
) system.upstartJobs.jobs);
|
|
|
|
}
|