mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 00:33:10 +00:00
3f1dd56e9e
svn path=/nixos/branches/modular-nixos/; revision=14953
47 lines
912 B
Nix
47 lines
912 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
|
|
nix
|
|
system
|
|
systemPath
|
|
config
|
|
;
|
|
|
|
inherit (system.nixosTools)
|
|
nixosCheckout
|
|
nixosHardwareScan
|
|
nixosInstall
|
|
nixosRebuild
|
|
nixosGenSeccureKeys
|
|
;
|
|
|
|
inherit (system.initialRamdiskStuff)
|
|
bootStage1
|
|
extraUtils
|
|
initialRamdisk
|
|
modulesClosure
|
|
;
|
|
|
|
nixFallback = system.nix;
|
|
|
|
manifests = system.config.installer.manifests; # exported here because nixos-rebuild uses it
|
|
|
|
tests = system.config.tests;
|
|
}
|