diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-12-09 11:57:56 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-12-10 13:25:25 +0100 |
commit | cb289a9256254d00e147521388093468eaf202cb (patch) | |
tree | cb8175fc2200891057f4abcbe57e42c6c5ad2e78 /flake.nix | |
parent | ede5720a0dde969cf83dd7cbbe54ad8c5ff7a97b (diff) |
flake: be backwards-compatible for `--impure`
We cannot pass `overlays = ...` to `nixpkgs` directly because by default
overlays from `~/.config/nixpkgs` are loaded in there. This doesn't
happen by default, but when using `--impure`.
Explicitly specifying that ignores these overlays. By using `pkgs.extend`
the old behavior can be kept and the new overlay can be applied.
Co-authored-by: Silvan Mosberger <contact@infinisil.com>
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/flake.nix b/flake.nix index 307eea0cd040..9b437c169a4f 100644 --- a/flake.nix +++ b/flake.nix @@ -52,10 +52,9 @@ # attribute it displays `omitted` instead of evaluating all packages, # which keeps `nix flake show` on Nixpkgs reasonably fast, though less # information rich. - legacyPackages = forAllSystems (system: import ./. { - inherit system; - overlays = [ self.overlays.setLibVersionInfo ]; - }); + legacyPackages = forAllSystems (system: + (import ./. { inherit system; }).extend self.overlays.setLibVersionInfo + ); nixosModules = { notDetected = ./nixos/modules/installer/scan/not-detected.nix; |