diff options
-rw-r--r-- | system/services/nix-sync/default.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix index 8652b43..c4ad282 100644 --- a/system/services/nix-sync/default.nix +++ b/system/services/nix-sync/default.nix @@ -147,6 +147,13 @@ }) cfg.repositories; + # generate the websites directory, so systemd can mount it read write + generatedDirectories = + lib.mapAttrsToList ( + _: repo: "d ${esa (parents repo.path)} 0755 ${cfg.user} ${cfg.group}" + ) + cfg.repositories; + repositoryType = lib.types.submodule ({name, ...}: { options = { name = lib.mkOption { @@ -224,8 +231,8 @@ in { } ]; - # generate the websites directory, so systemd can mount it rw - environment.etc."nginx/websites/.keep".text = "keep this directory"; + systemd.tmpfiles.rules = + generatedDirectories; systemd.services = services; systemd.timers = timers; |