fix(systemd): add 'after' dependencies for mount points

Ensure netatalk, samba, and syncthing services start only after the required mount points are available. This improves service dependency handling and prevents potential race conditions.
This commit is contained in:
Harald Hoyer 2025-05-21 08:16:52 +02:00
parent 35b37b171a
commit 4969715aa2

View file

@ -2,6 +2,7 @@
}:
{
systemd.services.netatalk.requires = [ "mnt-backup.mount" "mnt-raid.mount" ];
systemd.services.netatalk.after = [ "mnt-backup.mount" "mnt-raid.mount" ];
services.netatalk = {
enable = true;
settings = {
@ -33,6 +34,7 @@
};
systemd.services.samba.requires = [ "mnt-raid.mount" ];
systemd.services.samba.after = [ "mnt-raid.mount" ];
services.samba = {
enable = true;
openFirewall = true;
@ -69,6 +71,7 @@
};
systemd.services.syncthing.requires = [ "mnt-raid.mount" ];
systemd.services.syncthing.after = [ "mnt-raid.mount" ];
services.syncthing = {
enable = true;
user = "harald";