Expose `config.nix` for flakes to use (#1238)
commit19052d83fda811dd39216e3fc197c980abd037fd
authorHamish Mackenzie <Hamish.Mackenzie@iohk.io>
dateWed 15 Sep 2021, 23:00 (5 years ago)
parenta8f5d7b
docs/tutorials/getting-started-flakes.md+1−1
@@ -62,7 +62,7 @@ Add `flake.nix`:
6262 };
6363 })
6464 ];
65− pkgs = import nixpkgs { inherit system overlays; };
65+ pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
6666 flake = pkgs.helloProject.flake {
6767 # This adds support for `nix build .#js-unknown-ghcjs-cabal:hello:exe:hello`
6868 crossPlatforms = p: [p.ghcjs];
docs/tutorials/getting-started-hix.md+1−1
@@ -188,7 +188,7 @@ Example `flake.nix` file:
188188 };
189189 })
190190 ];
191− pkgs = import nixpkgs { inherit system overlays; };
191+ pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
192192 flake = pkgs.helloProject.flake {
193193 # This adds support for `nix build .#js-unknown-ghcjs:hello:exe:hello`
194194 crossPlatforms = p: [p.ghcjs];
flake.nix+2−1
@@ -55,11 +55,12 @@
5555
5656 outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, ... }@inputs:
5757 let compiler = "ghc884";
58+ config = import ./config.nix;
5859 in {
60+ inherit config;
5961 overlay = self.overlays.combined;
6062 overlays = import ./overlays { sources = inputs; };
6163 internal = rec {
62− config = import ./config.nix;
6364 nixpkgsArgs = {
6465 inherit config;
6566 overlays = [ self.overlay ];