summary refs log tree commit diff
path: root/fleet/modules/public-inbox.nix
diff options
context:
space:
mode:
Diffstat (limited to 'fleet/modules/public-inbox.nix')
-rw-r--r--fleet/modules/public-inbox.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/fleet/modules/public-inbox.nix b/fleet/modules/public-inbox.nix
index a8aa06b..5c69fba 100644
--- a/fleet/modules/public-inbox.nix
+++ b/fleet/modules/public-inbox.nix
@@ -11,6 +11,8 @@ with lib;
 let
   cfg = config.services.public-inbox;
 
+  root = "/var/lib/public-inbox";
+
   environment.PI_CONFIG = "${pkgs.writeText "public-inbox-config" (generators.toGitINI public-inbox-config)}";
 
   # TODO(V): Port this to a Nix type
@@ -23,7 +25,7 @@ let
     publicinbox = mapAttrs (inbox: config: {
       address = [ "${inbox}@${config.domain}" ];
       url = "https://${config.domain}/${inbox}";  # TODO(V): Allow using a different location than this
-      inboxdir = "/var/lib/public-inbox/${inbox}.git";
+      inboxdir = "${root}/${inbox}";
       inherit (config) watch;
     }) cfg.inboxes;
   } cfg.settings;
@@ -70,12 +72,15 @@ in {
       isSystemUser = true;
       group = "public-inbox";
 
-      home = "/var/lib/public-inbox";
-      createHome = true;
+      home = root;
     };
 
     users.groups.public-inbox = {};
 
+    systemd.tmpfiles.rules = [
+      "d ${root} 0750 public-inbox public-inbox"
+    ];
+
     systemd.services.public-inbox-init = {
       description = "public-inbox mailing-list archive (initialization)";