Proper data path for services

Hi,
I am hosting some services with Nixos.
Nextcloud and immich have their default data directory under /var/lib/. But now I added mealie and adguard which have their data in /var/lib/private/ with a symlink to /var/lib/.
What is the reason for this? Is there a difference?

Those services are likely using systemd Dynamic Users with a lot tighter systemd security measures in place. It’s totally fine unless you have a service where you need to routinely share that data with another application, in which case it can get more complicated. But otherwise, it’s a good thing!

Thanks :+1:
Is it a problem to store the paths under /var/lib/private unto a btrfs subvolume and back up the applications that way?

I will just try it out

1 Like