Home-manager news -- no configuration found

How do I get home-manager news working? When I run it, I get:

home-manager news
No configuration file found. Please create one at /home/user/.config/home-manager/home.nix

I am running nixos unstable with a flake, and my home.nix file is in $HOME/.dotfiles/users/home.nix.
Do I need to use programs.home-manager.path?

I played around with it, and it seems as if the home-manager news command is not compatible with a flake based setup. It seems to do a “magic” invocation that includes the usage of <home-manager/home-manager/build-news.nix>.

I found a ticket that claims the exact issue here was fixed on unstable (News cannot be read when using flakes only · Issue #2033 · nix-community/home-manager · GitHub) but I can reproduce the eact issue you are reporting

Try running it with --flake for example in my case it’s home-manager news --flake .#work-m1

4 Likes