如何在主页管理器

时间:2018-05-31 10:24:59

标签: nix nixos

添加不稳定频道后

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

我在〜/ .config / nixpkgs / overlays / package-upgrades / default.nix

下添加了一个叠加层
self: super:
let
  unstable = import <unstable> {};
in {
  jbake = unstable.jbake;
}

此叠加层已添加到home.nix

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

当我运行home-manager switch时出现错误

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

可以找到整个配置here

如何使用home-manager和叠加层从unstable升级单个属性?

1 个答案:

答案 0 :(得分:0)

这个thread on nixos discourse似乎很重要。似乎在导入不稳定对象时也会应用叠加层,从而导致无限递归。尝试类似的东西:

let
  unstable = import <unstable> {};
in {
  home.packages = with pkgs; [
    ...
  ] ++ (with unstable; [
    jbake
  ]);
}