1 { pkgs, lib, config, hostName, hosts, ... }:
3 inherit (config) networking;
4 inherit (config.services) syncoid;
5 inherit (config.security) gnupg;
6 inherit (config.users) groups;
9 networking.nftables.ruleset = lib.mkAfter ''
10 add rule inet filter fw2net \
11 meta skuid @nixos-syncoid-uids \
14 comment "syncoid: allow SSH"
16 security.gnupg.secrets."ssh/backup.ssh-ed25519" = {};
17 systemd.tmpfiles.rules = [
18 "z /dev/zfs 0660 - disk -"
22 nftables.enable = true;
23 interval = "*-*-* *:05:00";
25 sshKey = gnupg.secrets."ssh/backup.ssh-ed25519".path;
30 #"--no-privilege-elevation"
34 after = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
35 wants = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
36 serviceConfig.Group = groups."disk".name;
39 "${hostName}/home/julm/work" = {
41 target = "backup@mermet.${networking.domain}:rpool/backup/${hostName}/home/julm/work";
43 "backup@mermet.${networking.domain}:rpool/var/mail" = {
45 target = "${hostName}/backup/mermet/var/mail";
47 "backup@mermet.${networking.domain}:rpool/var/postgresql" = {
49 target = "${hostName}/backup/mermet/var/postgresql";
51 "backup@mermet.${networking.domain}:rpool/var/prosody" = {
53 target = "${hostName}/backup/mermet/var/prosody";
55 "backup@mermet.${networking.domain}:rpool/var/public-inbox" = {
57 target = "${hostName}/backup/mermet/var/public-inbox";
59 "backup@mermet.${networking.domain}:rpool/var/www" = {
61 target = "${hostName}/backup/mermet/var/www";
63 "backup@mermet.${networking.domain}:rpool/var/git" = {
65 target = "${hostName}/backup/mermet/var/git";
67 "backup@mermet.${networking.domain}:rpool/var/redis-rspamd" = {
69 target = "${hostName}/backup/mermet/var/redis-rspamd";
71 "backup@mermet.${networking.domain}:rpool/home/julm/mail" = {
73 target = "${hostName}/backup/mermet/home/julm/mail";
75 "backup@mermet.${networking.domain}:rpool/home/julm/log" = {
77 target = "${hostName}/backup/mermet/home/julm/log";