Open bonds opened 5 months ago
I'm facing the same issue as well, but for nix-darwin. I thought I solved it by downgrading versions. But no luck. Are there any workaround for this?
I think I found something. Manually running the home manager script generated after running nixos-rebuild switch I see this:
at 12:16:49 ❄️ ❯ /nix/store/7i0d80cp7l2f3kzphp2pgl75f8k9bqal-hm-setup-env /nix/store/3wxnh4nrqifbxswim1awibrcssxg040v-home-manager-generation
Starting Home Manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Existing file '/home/scott/.config/autostart/ulauncher.desktop' is in the way of '/nix/store/gsskllgsxxhikiv109lybnv6bgk12bzm-home-manager-files/.config/autostart/ulauncher.desktop'
Existing file '/home/scott/.local/share/applications/dwarf.desktop' is in the way of '/nix/store/gsskllgsxxhikiv109lybnv6bgk12bzm-home-manager-files/.local/share/applications/dwarf.desktop'
Please do one of the following:
- Move or remove the above files and try again.
- In standalone mode, use 'home-manager switch -b backup' to back up
files automatically.
- When used as a NixOS or nix-darwin module, set
'home-manager.backupFileExtension'
to, for example, 'backup' and rebuild.
It seems that home manager errors out without reporting the problem to nixos-rebulid, so it's silently failing. I am able to fix the problem as it suggested, and then when I run nixos-rebuild switch, the home.files module works fine. So I think the bug here is the failing silently part...it would be better if home manager told nixos that there was an error and what the problem is, so that nixos-rebuild switch can error out and report the problem, rather than partially working and partially not working.
I am facing a similar issue. I want add something to the end of .bashrc
by
home.file.".bashrc".text = ''
eval "$(direnv hook bash)"
'';
There are no errors in nixos-rebuild and the contents are also not appended to .bashrc
.
EDIT: I disabled bash using programs.bash.enable = false;
and now it did append. So is this taking precedence over home.file
?
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.
* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.
Are you following the right branch?
Is there an existing issue for this?
Issue description
home.file won't create a file and symlink when I use home-manager as a module in a nixos config and running
sudo nixos-rebuild switch --flake .
The rebuild runs fine except for home.file, which fails quietly. I note that home.packages and other home dot config works fine, so home.nix does seem to be operating in general, it's just home.file that's not working.The specific nix config in question can be seen here: https://github.com/bonds/dotfiles/tree/58bdcaffaf5cd40eee1796c708effd28b0807b4e/.config/nix
Maintainer CC
No response
System information