summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-07-05 21:09:56 +0200
committerSoispha <soispha@vhack.eu>2023-07-05 21:09:56 +0200
commit5bed7c8ee0c95526f08b046b1a0b6832ea21606b (patch)
tree3f328aebd5284555c83e1ba6980b33bec381b04e
parentFix(system/services/nix-sync): Rebuild website on gc (diff)
downloadnixos-server-5bed7c8ee0c95526f08b046b1a0b6832ea21606b.zip
Fix(system/services/nix-sync): Generate the needed repo paths
Diffstat (limited to '')
-rw-r--r--system/services/nix-sync/default.nix11
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;