unifi: chown the data dir as well.

It needs to be writeable.

Changed files
+3 -3
nixos
modules
services
networking
+3 -3
nixos/modules/services/networking/unifi.nix
···
environment.LD_LIBRARY_PATH = with pkgs.stdenv; "${cc.cc.lib}/lib";
preStart = ''
-
# Ensure privacy of state
-
chown unifi "${stateDir}"
-
chmod 0700 "${stateDir}"
+
# Ensure privacy of state and data.
+
chown unifi "${stateDir}" "${dataDir}"
+
chmod 0700 "${stateDir}" "${dataDir}"
# Create the volatile webapps
rm -rf "${stateDir}/webapps"