diff options
author | Soispha <soispha@vhack.eu> | 2023-07-05 21:09:56 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-05 21:09:56 +0200 |
commit | 5bed7c8ee0c95526f08b046b1a0b6832ea21606b (patch) | |
tree | 3f328aebd5284555c83e1ba6980b33bec381b04e | |
parent | Fix(system/services/nix-sync): Rebuild website on gc (diff) | |
download | nixos-server-5bed7c8ee0c95526f08b046b1a0b6832ea21606b.tar.gz nixos-server-5bed7c8ee0c95526f08b046b1a0b6832ea21606b.zip |
Fix(system/services/nix-sync): Generate the needed repo paths
-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; |