diff --git a/docs/tutorials/getting-started-flakes.md b/docs/tutorials/getting-started-flakes.md index 46844caf..ed670cf1 100644 --- a/docs/tutorials/getting-started-flakes.md +++ b/docs/tutorials/getting-started-flakes.md @@ -62,7 +62,7 @@ Add `flake.nix`: }; }) ]; - pkgs = import nixpkgs { inherit system overlays; }; + pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; }; flake = pkgs.helloProject.flake { # This adds support for `nix build .#js-unknown-ghcjs-cabal:hello:exe:hello` crossPlatforms = p: [p.ghcjs]; diff --git a/docs/tutorials/getting-started-hix.md b/docs/tutorials/getting-started-hix.md index 375b104a..7be3e2fd 100644 --- a/docs/tutorials/getting-started-hix.md +++ b/docs/tutorials/getting-started-hix.md @@ -188,7 +188,7 @@ Example `flake.nix` file: }; }) ]; - pkgs = import nixpkgs { inherit system overlays; }; + pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; }; flake = pkgs.helloProject.flake { # This adds support for `nix build .#js-unknown-ghcjs:hello:exe:hello` crossPlatforms = p: [p.ghcjs]; diff --git a/flake.nix b/flake.nix index eda554f1..733db5a4 100644 --- a/flake.nix +++ b/flake.nix @@ -55,11 +55,12 @@ outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, ... }@inputs: let compiler = "ghc884"; + config = import ./config.nix; in { + inherit config; overlay = self.overlays.combined; overlays = import ./overlays { sources = inputs; }; internal = rec { - config = import ./config.nix; nixpkgsArgs = { inherit config; overlays = [ self.overlay ];