Open fredcy opened 3 weeks ago
I'm able to work around the issue by adding symlinks to the config files generated by home-manager:
ln -s ~/.config/hg/hgrc ~/.hgrc
ln -s ~/.config/hg/hgignore_global ~/.hgignore_global
Please submit home manager issues to their repo. Thanks.
Additionally darwin package may not necessarily store it's configs in .config/hg
but rather in .hg
.
If anything this should be reported to upstream package repo.
Describe the bug
When I enable and configure the "mercurial" package via home-manager (within nix-darwin), the generated config files in ~/.config/hg are not read by the
hg
executable and so they do not take effect as needed.Steps To Reproduce
Using home-manager (25.05) within nix-darwin (nixpgks 24.05), enable the mercurial package:
Build the nix-darwin flake (with included home-manager module):
darwin-rebuild switch --flake .
Verify that the generated ~/.config/hg/hgrc file includes
username=Joe Schmoe <joe@example.com>
.Verify that hg picks up the generated configuration:
hg config ui.username
Verify that hg is looking in the generated ~/.config/hg/hgrc file:
hg --debug ui.username
Expected behavior
I expect the first hg command to report the user name/email value that we set, like this:
Instead, it reports no value at all:
I expect the output of
hg --debug config ui.username
to show that it is reading the ~/.config/hg/hgrc file among others, but it does not:(The /nix/store/n5apv7svzvka6i0xc40m7lk6yrdk2yvp-mercurial-6.6.3/etc/mercurial/hgrc path is "no such file or directory")
Additional context
I have used the same mercurial home-manager config on a linux system (with just nixpkgs, not nixos) and it works fine there, reading the hg config files in ~/.config/hg.
Notify maintainers
@techknowlogick @edolstra @lukegb
Metadata
Add a :+1: reaction to issues you find important.