summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/nix-sync/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix
index de51f0b..ed2c6ac 100644
--- a/system/services/nix-sync/default.nix
+++ b/system/services/nix-sync/default.nix
@@ -81,7 +81,7 @@
       # Security
       NoNewPrivileges = true;
       # Sandboxing (sorted by occurrence in https://www.freedesktop.org/software/systemd/man/systemd.exec.html)
-      ReadWritePaths = ["${esa repo.path}" "-${esa repoCachePath}"];
+      ReadWritePaths = ["/etc/nginx/websites" "-${esa repoCachePath}"];
       ReadOnlyPaths = ["/nix"];
       ProtectSystem = "strict";
       ProtectHome = true;
@@ -199,6 +199,10 @@ in {
         message = "Your cachePath ('${cfg.cachePath}') ends with a slash ('/'), please use: '${lib.strings.removeSuffix "/" cfg.cachePath}'.";
       }
     ];
+
+    # generate the websites directory, so systemd can mount it rw
+    environment.etc."nginx/websites/.keep".text = "keep this directory";
+
     systemd.services = services;
     users.users =
       if cfg.user == "nix-sync"