summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorSvein Ove Aas <sveina@gmail.com>2016-08-16 20:34:26 +0100
committerSvein Ove Aas <sveina@gmail.com>2016-08-16 21:01:49 +0100
commite3f0a09b6dfee8477eccedeb2994643b5852897f (patch)
tree075367c9a84c16890a0bf41029d96204d23005df /nixos/modules
parent9adad8612b082bcbae30c81678a04b79a44079a4 (diff)
downloadnixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.tar
nixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.tar.gz
nixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.tar.bz2
nixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.tar.lz
nixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.tar.xz
nixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.tar.zst
nixpkgs-e3f0a09b6dfee8477eccedeb2994643b5852897f.zip
unifi: chown the data dir as well.
It needs to be writeable.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/unifi.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/unifi.nix b/nixos/modules/services/networking/unifi.nix
index cb5a88e67aa..e1f4755321f 100644
--- a/nixos/modules/services/networking/unifi.nix
+++ b/nixos/modules/services/networking/unifi.nix
@@ -79,9 +79,9 @@ in
       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"