mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
7ac0b3aaea
the initial ramdisk as config.system.build.bootStage1. svn path=/nixos/branches/modular-nixos/; revision=15739
35 lines
707 B
Nix
35 lines
707 B
Nix
let
|
|
|
|
fromEnv = name: default:
|
|
let env = builtins.getEnv name; in
|
|
if env == "" then default else env;
|
|
|
|
configuration = import (fromEnv "NIXOS_CONFIG" /etc/nixos/configuration.nix);
|
|
|
|
nixpkgs = fromEnv "NIXPKGS" /etc/nixos/nixpkgs;
|
|
|
|
system = import system/system.nix { inherit configuration nixpkgs; };
|
|
|
|
in
|
|
|
|
{ inherit (system)
|
|
activateConfiguration
|
|
bootStage2
|
|
etc
|
|
grubMenuBuilder
|
|
kernel
|
|
modulesTree
|
|
system
|
|
systemPath
|
|
config
|
|
;
|
|
|
|
nix = system.config.environment.nix;
|
|
|
|
nixFallback = (import nixpkgs {}).nixUnstable;
|
|
|
|
manifests = system.config.installer.manifests; # exported here because nixos-rebuild uses it
|
|
|
|
tests = system.config.tests;
|
|
}
|