1 { pkgs, lib, config, machineName, machines, ... }:
3 inherit (config) networking;
4 inherit (config.services) syncoid;
5 inherit (config.security) gnupg;
8 networking.nftables.ruleset = ''
9 add rule inet filter fw2net \
10 skuid "${syncoid.user}" \
12 ip daddr ${machines.mermet.extraArgs.ipv4} \
14 comment "SSH to mermet"
16 security.gnupg.secrets."ssh/backup.ssh-ed25519" = {
19 users.groups.keys.members = [ syncoid.user ];
22 interval = "*-*-* *:05:00";
23 sshKey = gnupg.secrets."ssh/backup.ssh-ed25519".path;
27 #"--no-privilege-elevation"
31 after = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
32 wants = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
35 "${machineName}/home/julm/work" = {
37 target = "backup@mermet.${networking.domain}:rpool/backup/${machineName}/home/julm/work";
39 "backup@mermet.${networking.domain}:rpool/var/mail" = {
41 target = "${machineName}/backup/mermet/var/mail";
43 "backup@mermet.${networking.domain}:rpool/var/public-inbox" = {
45 target = "${machineName}/backup/mermet/var/public-inbox";
47 "backup@mermet.${networking.domain}:rpool/var/www" = {
49 target = "${machineName}/backup/mermet/var/www";
51 "backup@mermet.${networking.domain}:rpool/var/git" = {
53 target = "${machineName}/backup/mermet/var/git";
55 "backup@mermet.${networking.domain}:rpool/var/redis" = {
57 target = "${machineName}/backup/mermet/var/redis";
59 "backup@mermet.${networking.domain}:rpool/home/julm/mail" = {
61 target = "${machineName}/backup/mermet/home/julm/mail";
63 "backup@mermet.${networking.domain}:rpool/home/julm/log" = {
65 target = "${machineName}/backup/mermet/home/julm/log";