Home-manager inside nixos-wsl managing windows configuration files

I recently installed nixos-wsl on my windows machine. Surprisingly it somewhat works with the windows home direcctory. In nixos-wsl configuration I set home = "/mnt/c/Users/User"; home-manager happily set up my symlinks in this home directory and I can see my zsh prompt.
However programs from windows side cannot read any symlinks. git and git bash on windows were giving me error messages. To solve this I found a pull request allowing copying instead of symlinking New option `home.file.<name>.mode` copies instead of symlinks by zeorin · Pull Request #7074 · nix-community/home-manager · GitHub . I slightly patched it to default everything to copy git+https://github.com/mio-19/home-manager.git?ref=file-mode and after that vscode on windows picked up vscode extensions in my home manager configurations! (with a small workaround environment.sessionVariables.DONT_PROMPT_WSL_INSTALL = "No_Prompt_please";)

2 Likes