diff options
author | Aspen Smith <root@gws.fyi> | 2024-09-29T14·46-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-09-29T18·43+0000 |
commit | 278ffa2b05d92e4eb3e16ff10fe8307cb8f91144 (patch) | |
tree | 6c83f592b61910bf40b98072811be49c33a87c0d /users | |
parent | e9d10753d5227c02babd34f928314659b8f4b120 (diff) |
feat(aspen/system): Setup a systemd timer to sync the depot public inbox r/8735
Change-Id: Iaeae18af25b00b04bd805dabb320c218cb21fd8f Reviewed-on: https://cl.tvl.fyi/c/depot/+/12545 Tested-by: BuildkiteCI Autosubmit: aspen <root@gws.fyi> Reviewed-by: aspen <root@gws.fyi>
Diffstat (limited to 'users')
-rw-r--r-- | users/aspen/system/home/machines/lusca.nix | 7 | ||||
-rw-r--r-- | users/aspen/system/home/modules/depot-inbox.nix | 26 |
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" ]; + }; + }; +} |