nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.05k stars 1.82k forks source link

bug: 23.05 -> 23.11 `newsInfo` not found #4719

Open Rosuavio opened 11 months ago

Rosuavio commented 11 months ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

With a standalone installation, after updating nixpkgs and home-manager references to 23.11, when running home-manager build I get this error.

...
building '/nix/store/xbqbyaakp9h6sqknjnvp9wgmqhh589k7-home-manager-generation.drv'...
/nix/store/lkl072ngvib2gdmpwf7mrg21fag069hy-home-manager-generation
error: attribute 'newsInfo' in selection path 'newsInfo' not found
/home/rosario/.nix-profile/bin/home-manager: line 526: /run/user/1000/home-manager-build.nt98UKMCzP/news-info.sh: No such file or directory

It might not be a big issue, when running home-manager switch the error shows, but the new configs are installed along with the new home-manager script regardless. And next uses of home-manager commands don't seem to show the error.

Also this error could be just me. While I have...

programs.home-manager.enable = true;

some of my config is different that "standalone+channels". I use a wrapper I wrote that allows me to avoid channels in a development shell

let
  sources = import ./nix/sources.nix;

  pkgs = import sources.nixpkgs-unstable {};
  home-config = import sources.home-config {};

in pkgs.mkShell rec {

  name = "home-dev";

  packages = [
    (home-config.mkHomeScriptWrapper { home-config-path = toString ./. + "/home.nix"; })
  ];

  NIXPKGS_ALLOW_UNFREE = 1;
}

Maintainer CC

@rycee

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.63, NixOS, 23.05 (Stoat), 23.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.6`
 - channels(rosario): `"nixpkgs"`
 - channels(root): `"nixos-22.11"`
 - nixpkgs: `/home/rosario/.nix-defexpr/channels/nixpkgs`
AndrewKvalheim commented 11 months ago

Running nix-shell '<home-manager>' -A install appears to have worked around it, though the switch implicit in that was inconvenient as I’d originally only wanted to build.

stale[bot] commented 8 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.