Skip to content

Setting nixpkgs.overlays in Home Manager Module on NixOS or nix-darwin cause warning on when home-manager.useGlobalPkgs = true #877

@Pablo1107

Description

@Pablo1107

Sorry for the verbose title but as title says:

Setting nixpkgs.overlays in Home Manager Module on NixOS or nix-darwin cause warning on when home-manager.useGlobalPkgs = true. I've encountered this warning when switching my NixOS config:

evaluation warning: <user> profile: You have set either `nixpkgs.config` or `nixpkgs.overlays` while using `home-manager.useGlobalPkgs`.
                    This will soon not be possible. Please remove all `nixpkgs` options when using `home-manager.useGlobalPkgs`.

I have no nixpkgs.config nor nixpkgs.overlay config on my home manager files. So I started looking at how I set up my home manager modules and found out that I had a redundant use of NUR modules because I have on NixOS and Home Manager at the same time, and also configured the overlay on nixpkgs.

It's not easy to know where how this happens. So I would advise a warning on the README or some assertion in the module which I don't how feasible is to do.

TL;DR: But either way, I want to create this issue in case someone else bumps into this themselves. Just setup the overlay manually and do not import hm module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions