Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically backup filename collisions during home-manager installation #6211

Open
nikhil-057 opened this issue Dec 16, 2024 · 0 comments
Open
Assignees

Comments

@nikhil-057
Copy link

nikhil-057 commented Dec 16, 2024

Description

I have a git repo with home.nix and dotfiles, which I use to bootstrap all my non-nixos VMs.

Home-manager installation usually fails because most distros come with some user-level dotfiles by default (such as ~/.profile), and my home-manager config attempts to create these dotfiles, resulting in collisions.

The home-manager cli already provides a -b EXT option. However, nix-shell "<home-manager>" -A install runs a hard-coded shellHook that does not make use of this option.

I feel that the simplest solution is to allow users to customize the shellHook by turning it into a function arg, taking advantage of the callPackage mechanism to override the shellHook as the user sees fit. I've already opened a PR implementing this, but happy for the maintainers to implement any solution that solves this issue.

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

No branches or pull requests

4 participants