nix-community / impermanence

Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]
MIT License
1.09k stars 80 forks source link

home-manager: race condition with certain services #60

Closed bbjubjub2494 closed 2 years ago

bbjubjub2494 commented 2 years ago

I use syncthing via home-manager, so I have to bind-mount its mutable directories. The problem is that both the bind-mount and syncthing itself are started via systemd, so syncthing may start and recreate its configuration from scratch before bindfs gets a chance to do its thing.

My current solution is to turn the bindfs unit into a forking-type systemd unit and make the syncthing unit depend on it. Is there a known better solution? If not I will PR my patch.

talyz commented 2 years ago

I've created a follow-up PR (#62) to address the second part of your issue. Can you try it out without adding dependencies to the syncthing unit and see if it still works?