Using home-manager, I am trying to achieve the same result as running the mount command:
sudo mount -o bind --source /home/dob/nextcloud/syncDir --target /home/dob/syncDir
In home.nix
I have defined the following:
systemd.user.mounts = {
syncDir = {
Unit = {
Description = "syncDir mount";
};
Mount = {
What = "/home/dob/nextcloud/syncDir";
Where = "/home/dob/syncDir";
};
};
};
Rebuilding and switching works, but the mount is not activated. No related mount file shows up when I run ls -al /etc/systemd/system/*.mount
, and no entry shows up for journalctl -u syncDir
.
Does anyone see what I am doing wrong here, or where I can look to debug potential errors?
Disclaimer: This problem was initially discussed (but not solved) in another topic. This current topic was made for clarity.