Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install jbake from unstable with overlay in home-manager

Tags:

nix

nixos

After adding the unstable channel

nix-channel --add https://nixos.org/channels/nixpkgs-unstable unstable

I added an overlay under ~/.config/nixpkgs/overlays/package-upgrades/default.nix

self: super:
let
  unstable = import <unstable> {};
in {
  jbake = unstable.jbake;
}

This overlay is added to home.nix

nixpkgs.overlays = [ (import ./overlays/package-upgrades) ];

When I run home-manager switch there is an error

0 + john@n1 nixpkgs $ home-manager switch
Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

The entire configuration can be found here.

How can I upgrade a single attribute from unstable using home-manager and an overlay?

like image 981
John Mercier Avatar asked May 31 '18 10:05

John Mercier


1 Answers

This thread on nixos discourse seems relevant. It appears the overlay also gets applied when importing unstable, resulting in an infinite recursion. Try something like:

let
  unstable = import <unstable> {};
in {
  home.packages = with pkgs; [
    ...
  ] ++ (with unstable; [
    jbake
  ]);
}
like image 178
Gerd Flaig Avatar answered Sep 27 '22 19:09

Gerd Flaig