Skip to content

Commit 6d9dfef

Browse files
committed
nixos/nixpkgs: show definition files in config assertion
1 parent 1bd4da1 commit 6d9dfef

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

nixos/modules/misc/nixpkgs.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ in
387387
388388
Current value:
389389
${lib.generators.toPretty { multiline = true; } cfg.config}
390+
391+
Defined in:
392+
${lib.concatMapStringsSep "\n" (file: " - ${file}") opt.config.files}
390393
'';
391394
}
392395
];

nixos/modules/misc/nixpkgs/test.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let
1717
nixpkgs.buildPlatform = "aarch64-linux";
1818
};
1919
externalPkgsWithConfig = {
20+
_file = "ext-pkgs-config.nix";
2021
nixpkgs.pkgs = pkgs;
2122
nixpkgs.config.allowUnfree = true;
2223
};
@@ -122,6 +123,9 @@ lib.recurseIntoAttrs {
122123
{
123124
allowUnfree = true;
124125
}
126+
127+
Defined in:
128+
- ext-pkgs-config.nix
125129
''];
126130
assert getErrors {
127131
nixpkgs.localSystem = pkgs.stdenv.hostPlatform;

0 commit comments

Comments
 (0)