Skip to content

Conversation

@BenRaz123
Copy link

@BenRaz123 BenRaz123 commented Nov 29, 2025

Description

When running the installer through nix-shell "<home-manager>" -A install, any conflicts will lead to the installation aborting. This can be a problem if you installed the ~/.config/home-manager/home.nix before home-manager itself. There is very little documentation on how to fix this in the manual, so after figuring out how to do it, I decided to extend the documentation on the standalone installation with this information.

Potential issues

  • Wording: What use case this info box is addressing is not explicitly mentioned, may be a problem because it's prominent positioning could confuse users about what they should worry about

Checklist

  • Change is backwards compatible.

  • Code formatted with nix fmt or
    nix-shell -p treefmt nixfmt deadnix keep-sorted --run treefmt.

  • Code tested through nix run .#tests -- test-all or
    nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.
    • Generate a news entry. See News
    • Basic tests added. See Tests
  • If this PR adds an exciting new feature or contains a breaking change.

    • Generate a news entry. See News

The documentation on the standalone installation didn't detail how to
automatically resolve installation conflicts even though that is a
feature of the bash script. Added it as an aside and verified with
`nix-run -A docs.html` to make sure all formatting looked good.

Signed-off-by: Ben Raz <[email protected]>
$ HOME_MANAGER_BACKUP_OVERWRITE=1 nix-shell '<home-manager>' -A install
```
:::

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with this usage of hm but:

  • I dont like the use of environment variables. It goes opposite of the nix way that is explicit about everything. -b bak should be equivalent.
  • the installation process is always a painful one so we should strive to keep it simple and not dive into too many details. HOME_MANAGER_BACKUP_OVERWRITE can be omitted, the previous section should be enough to unblock the user. It could be mentioned as a link towards a more relevant documentation eg "See more". I dont think HOME_MANAGER_BACKUP_OVERWRITE is documented though. -B can probably be leveraged to the same effect.

@teto
Copy link
Collaborator

teto commented Dec 5, 2025

while doing some triage: #3524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants