1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

nixpkgs-disabled: correct assertion

Should only pass if _both_ attributes are `null`.

I recently found myself in a confusing situation when I added my usual
`homeConfiguration` to a `nixosConfiguration` that had
`home-manager.useGlobalPackages = true`.

`nixos-rebuild` was just claiming that some attributes were missing from `pkgs`,
rather than asserting that my `nixpkgs.overlays` was set when it couldn’t be.
This commit is contained in:
Greg Pfeil 2024-10-25 14:42:29 -06:00
parent 0c0268a3c8
commit caee7806be
No known key found for this signature in database
GPG key ID: 1193ACD196ED61F2

View file

@ -64,7 +64,7 @@ in {
config = {
assertions = [{
assertion = cfg.config == null || cfg.overlays == null;
assertion = cfg.config == null && cfg.overlays == null;
message = ''
`nixpkgs` options are disabled when `home-manager.useGlobalPkgs` is enabled.
'';