]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/losurdo/syncoid.nix
gnupg: disable building pinentry UIs
[sourcephile-nix.git] / hosts / losurdo / syncoid.nix
1 { pkgs, lib, config, hostName, hosts, ... }:
2 let
3 inherit (config) networking;
4 inherit (config.services) syncoid;
5 inherit (config.security) gnupg;
6 in
7 {
8 networking.nftables.ruleset = ''
9 add rule inet filter fw2net \
10 skuid "${syncoid.user}" \
11 tcp dport 22 \
12 ip daddr ${hosts.mermet.extraArgs.ipv4} \
13 counter accept \
14 comment "SSH to mermet"
15 '';
16 security.gnupg.secrets."ssh/backup.ssh-ed25519" = {
17 user = syncoid.user;
18 };
19 users.groups.keys.members = [ syncoid.user ];
20 services.syncoid = {
21 enable = true;
22 interval = "*-*-* *:05:00";
23 #interval = "*:0/1";
24 sshKey = gnupg.secrets."ssh/backup.ssh-ed25519".path;
25 commonArgs = [
26 "--no-sync-snap"
27 "--create-bookmark"
28 #"--no-privilege-elevation"
29 #"--no-stream"
30 ];
31 service = {
32 after = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
33 wants = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
34 };
35 commands = {
36 "${hostName}/home/julm/work" = {
37 sendOptions = "raw";
38 target = "backup@mermet.${networking.domain}:rpool/backup/${hostName}/home/julm/work";
39 };
40 "backup@mermet.${networking.domain}:rpool/var/mail" = {
41 sendOptions = "raw";
42 target = "${hostName}/backup/mermet/var/mail";
43 };
44 "backup@mermet.${networking.domain}:rpool/var/prosody" = {
45 sendOptions = "raw";
46 target = "${hostName}/backup/mermet/var/prosody";
47 };
48 "backup@mermet.${networking.domain}:rpool/var/public-inbox" = {
49 sendOptions = "raw";
50 target = "${hostName}/backup/mermet/var/public-inbox";
51 };
52 "backup@mermet.${networking.domain}:rpool/var/www" = {
53 sendOptions = "raw";
54 target = "${hostName}/backup/mermet/var/www";
55 };
56 "backup@mermet.${networking.domain}:rpool/var/git" = {
57 sendOptions = "raw";
58 target = "${hostName}/backup/mermet/var/git";
59 };
60 "backup@mermet.${networking.domain}:rpool/var/redis" = {
61 sendOptions = "raw";
62 target = "${hostName}/backup/mermet/var/redis";
63 };
64 "backup@mermet.${networking.domain}:rpool/home/julm/mail" = {
65 sendOptions = "raw";
66 target = "${hostName}/backup/mermet/home/julm/mail";
67 };
68 "backup@mermet.${networking.domain}:rpool/home/julm/log" = {
69 sendOptions = "raw";
70 target = "${hostName}/backup/mermet/home/julm/log";
71 };
72 };
73 };
74 }