2007-09-18 08:06:24 -07:00
|
|
|
let
|
|
|
|
|
2008-12-15 15:54:10 -08:00
|
|
|
fromEnv = name: default:
|
2008-10-06 16:23:28 -07:00
|
|
|
let env = builtins.getEnv name; in
|
|
|
|
if env == "" then default else env;
|
2009-05-20 03:18:54 -07:00
|
|
|
|
2008-10-06 16:23:28 -07:00
|
|
|
configuration = import (fromEnv "NIXOS_CONFIG" /etc/nixos/configuration.nix);
|
2009-05-20 03:18:54 -07:00
|
|
|
|
|
|
|
nixpkgs = fromEnv "NIXPKGS" /etc/nixos/nixpkgs;
|
2007-09-18 08:06:24 -07:00
|
|
|
|
2009-03-27 02:29:11 -07:00
|
|
|
system = import system/system.nix { inherit configuration nixpkgs; };
|
2007-09-18 08:06:24 -07:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{ inherit (system)
|
|
|
|
activateConfiguration
|
|
|
|
bootStage2
|
|
|
|
etc
|
|
|
|
grubMenuBuilder
|
|
|
|
kernel
|
2008-02-14 12:59:04 -08:00
|
|
|
modulesTree
|
2007-09-18 08:06:24 -07:00
|
|
|
nix
|
|
|
|
system
|
|
|
|
systemPath
|
|
|
|
config
|
|
|
|
;
|
|
|
|
|
2008-02-08 07:59:15 -08:00
|
|
|
inherit (system.nixosTools)
|
|
|
|
nixosCheckout
|
|
|
|
nixosHardwareScan
|
|
|
|
nixosInstall
|
|
|
|
nixosRebuild
|
2008-03-03 15:32:17 -08:00
|
|
|
nixosGenSeccureKeys
|
2008-08-11 04:37:56 -07:00
|
|
|
;
|
|
|
|
|
|
|
|
inherit (system.initialRamdiskStuff)
|
|
|
|
bootStage1
|
|
|
|
extraUtils
|
|
|
|
initialRamdisk
|
|
|
|
modulesClosure
|
|
|
|
;
|
2008-02-08 07:59:15 -08:00
|
|
|
|
2007-09-18 08:38:05 -07:00
|
|
|
nixFallback = system.nix;
|
|
|
|
|
2007-11-09 10:49:45 -08:00
|
|
|
manifests = system.config.installer.manifests; # exported here because nixos-rebuild uses it
|
2007-09-18 08:06:24 -07:00
|
|
|
|
2008-11-18 10:00:09 -08:00
|
|
|
tests = system.config.tests;
|
2007-09-18 08:06:24 -07:00
|
|
|
}
|