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

home.nix: path with '~' can not be resolved in pure mode #22

Open
pjaglom opened this issue Nov 13, 2024 · 2 comments
Open

home.nix: path with '~' can not be resolved in pure mode #22

pjaglom opened this issue Nov 13, 2024 · 2 comments

Comments

@pjaglom
Copy link

pjaglom commented Nov 13, 2024

I tried to follow your youtube tutorial on dotfile management with nix and home-manager, but when I try to follow your home-manager home.nix configuration, I get the following error message:

error: the path '~/.dotfiles/zshrc/.zshrc' can not be resolved in pure mode

I also tried an absolute path /Users/<my_username> and a relative path after moving my dotfile directory inside my nix-darwin directory, but the former didn't work either and the latter caused deletion issues of the dotfile repo when it replaced my nix-darwin directory.

Do you use impure evaluation with nix-darwin/home-manager? Is there another way around this error?

@ekarious
Copy link

I actually got the same problem. Trying to solve it right now.
Did you find a solution ?

@ekarious
Copy link

Found it.

you can make it work in this way

".zshrc".source = config.lib.file.mkOutOfStoreSymlink "/Users/<username>/.dotfiles/zshrc/.zshrc;

Do not forget to change the username, maybe the use of $HOME might work here now.

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

No branches or pull requests

2 participants