diff options
Diffstat (limited to '')
-rw-r--r-- | default.nix | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/default.nix b/default.nix index 30eff6c2e6a5..ebb9110eb355 100644 --- a/default.nix +++ b/default.nix @@ -8,27 +8,39 @@ let nixpkgs = fromEnv "NIXPKGS" /etc/nixos/nixpkgs; - system = import system/system.nix { inherit configuration nixpkgs; }; + pkgs = import nixpkgs {system = builtins.currentSystem;}; + + #system = import system/system.nix { inherit configuration nixpkgs; }; + + configComponents = [ + configuration + (import ./system/options.nix) + ]; + + # Make a configuration object from which we can retrieve option + # values. + config = + pkgs.lib.fixOptionSets + pkgs.lib.mergeOptionSets + pkgs configComponents; + optionDeclarations = + pkgs.lib.fixOptionSetsFun + pkgs.lib.filterOptionSets + pkgs configComponents + config; + in -{ inherit (system) - activateConfiguration - bootStage2 - etc - grubMenuBuilder - kernel - modulesTree - system - systemPath - config - ; - - nix = system.config.environment.nix; +{ + + system = config.system.build.system; + + nix = config.environment.nix; - nixFallback = (import nixpkgs {}).nixUnstable; + nixFallback = pkgs.nixUnstable; - manifests = system.config.installer.manifests; # exported here because nixos-rebuild uses it + manifests = config.installer.manifests; # exported here because nixos-rebuild uses it - tests = system.config.tests; + tests = config.tests; } |