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.
|
initialRamdisk.
|
||||||
The result can be extended in the modules by defining
|
The result can be extended in the modules by defining
|
||||||
extra attributes in system.build.
|
extra attributes in system.build.
|
||||||
|
Alternatively, you may use the result's config and
|
||||||
|
options attributes to query any option.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -23969,10 +23971,13 @@ in
|
|||||||
Note that you will need to have called Nixpkgs with the system
|
Note that you will need to have called Nixpkgs with the system
|
||||||
parameter set to the right value for your deployment target.
|
parameter set to the right value for your deployment target.
|
||||||
*/
|
*/
|
||||||
nixos = configuration:
|
nixos =
|
||||||
(import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
configuration:
|
||||||
inherit (pkgs.stdenv.hostPlatform) system;
|
let
|
||||||
modules = [(
|
c = import (pkgs.path + "/nixos/lib/eval-config.nix") {
|
||||||
|
inherit (pkgs.stdenv.hostPlatform) system;
|
||||||
|
modules =
|
||||||
|
[(
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
config.nixpkgs.pkgs = lib.mkDefault pkgs;
|
config.nixpkgs.pkgs = lib.mkDefault pkgs;
|
||||||
}
|
}
|
||||||
@ -23981,7 +23986,9 @@ in
|
|||||||
then configuration
|
then configuration
|
||||||
else [configuration]
|
else [configuration]
|
||||||
);
|
);
|
||||||
}).config.system.build;
|
};
|
||||||
|
in
|
||||||
|
c.config.system.build // c;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user