about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/aspen/system/home/machines/lusca.nix7
-rw-r--r--users/aspen/system/home/modules/depot-inbox.nix26
2 files changed, 29 insertions, 4 deletions
diff --git a/users/aspen/system/home/machines/lusca.nix b/users/aspen/system/home/machines/lusca.nix
index fc5f606639d6..d791b0ea9ded 100644
--- a/users/aspen/system/home/machines/lusca.nix
+++ b/users/aspen/system/home/machines/lusca.nix
@@ -1,14 +1,13 @@
 { pkgs, lib, config, ... }:
 
-let
-  inherit (builtins) pathExists;
-in
-{
+let inherit (builtins) pathExists;
+in {
   imports = [
     ../platforms/linux.nix
     ../modules/common.nix
 
     ../modules/email.nix
+    ../modules/depot-inbox.nix
     ../modules/desktop.nix
   ] ++ (lib.optional (pathExists ../modules/private.nix)
     ../modules/private.nix);
diff --git a/users/aspen/system/home/modules/depot-inbox.nix b/users/aspen/system/home/modules/depot-inbox.nix
new file mode 100644
index 000000000000..0694e6db2855
--- /dev/null
+++ b/users/aspen/system/home/modules/depot-inbox.nix
@@ -0,0 +1,26 @@
+{ config, lib, pkgs, ... }:
+
+let
+  depot = config.lib.depot;
+in
+
+{
+  systemd.user = {
+    services.sync-depot-public-inbox = {
+      Service.ExecStart = pkgs.writeShellScript "sync-depot-public-inbox" ''
+        ${depot.tools.fetch-depot-inbox}/bin/fetch-depot-inbox \
+          /home/aspen/mail/tvl/
+        ${pkgs.notmuch}/bin/notmuch new
+      '';
+    };
+
+    timers.sync-depot-public-inbox = {
+      Unit.Description = "Sync the depot public inbox";
+      Timer = {
+        OnCalendar = "*:*";
+        Unit = "sync-depot-public-inbox.service";
+      };
+      Install.WantedBy = [ "timers.target" ];
+    };
+  };
+}