Merge pull request #62046 from roberth/pkgs-nixos-expose-all-config
pkgs.nixos: Expose configuration directly
This commit is contained in:
commit
d9db65ce4b
@ -23932,6 +23932,8 @@ in
|
||||
initialRamdisk.
|
||||
The result can be extended in the modules by defining
|
||||
extra attributes in system.build.
|
||||
Alternatively, you may use the result's config and
|
||||
options attributes to query any option.
|
||||
|
||||
Example:
|
||||
|
||||
@ -23969,10 +23971,13 @@ in
|
||||
Note that you will need to have called Nixpkgs with the system
|
||||
parameter set to the right value for your deployment target.
|
||||
*/
|
||||
nixos = configuration:
|
||||
(import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
modules = [(
|
||||
nixos =
|
||||
configuration:
|
||||
let
|
||||
c = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
modules =
|
||||
[(
|
||||
{ lib, ... }: {
|
||||
config.nixpkgs.pkgs = lib.mkDefault pkgs;
|
||||
}
|
||||
@ -23981,7 +23986,9 @@ in
|
||||
then configuration
|
||||
else [configuration]
|
||||
);
|
||||
}).config.system.build;
|
||||
};
|
||||
in
|
||||
c.config.system.build // c;
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user