mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 22:36:23 +01:00
3c6ae39a0d
empty now), do more of bashrc.sh declaratively, and moved nsswitch generation to modules/config/nsswitch.nix. svn path=/nixos/branches/modular-nixos/; revision=15754
31 lines
794 B
Nix
31 lines
794 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;
|
|
|
|
pkgs = import nixpkgs {system = builtins.currentSystem;};
|
|
|
|
inherit
|
|
(import ./lib/eval-config.nix {inherit configuration pkgs;})
|
|
config optionDeclarations;
|
|
|
|
in
|
|
|
|
{
|
|
# Optionally check wether all config values have corresponding
|
|
# option declarations.
|
|
system = pkgs.checker config.system.build.system
|
|
config.environment.checkConfigurationOptions
|
|
optionDeclarations config;
|
|
|
|
# The following are used by nixos-rebuild.
|
|
nixFallback = pkgs.nixUnstable;
|
|
manifests = config.installer.manifests;
|
|
|
|
tests = config.tests;
|
|
}
|