diff options
author | Linus Heckemann <git@sphalerite.org> | 2019-09-01 12:25:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-01 12:25:39 +0200 |
commit | d9db65ce4bf93bc09dee106e6f4c60a78d816b21 (patch) | |
tree | 58f028634bbc28f23cd245381a5445757cfdac8a /pkgs/top-level | |
parent | e08cb1ff650430b80996637ad63b9209bef43a7f (diff) | |
parent | b52d80b89873c79f06fce15c30640ed39839221c (diff) | |
download | nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.tar nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.tar.gz nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.tar.bz2 nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.tar.lz nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.tar.xz nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.tar.zst nixpkgs-d9db65ce4bf93bc09dee106e6f4c60a78d816b21.zip |
Merge pull request #62046 from roberth/pkgs-nixos-expose-all-config
pkgs.nixos: Expose configuration directly
Diffstat (limited to 'pkgs/top-level')
-rw-r--r-- | pkgs/top-level/all-packages.nix | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c06d9aa50d4..b178775b2d8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; /* |