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 = ''
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 interval = "*-*-* *:05:00";
24 sshKey = gnupg.secrets."ssh/backup.ssh-ed25519".path;
29 #"--no-privilege-elevation"
33 after = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
34 wants = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
35 serviceConfig.Group = groups."disk".name;
38 "${hostName}/home/julm/work" = {
40 target = "backup@mermet.${networking.domain}:rpool/backup/${hostName}/home/julm/work";
42 "backup@mermet.${networking.domain}:rpool/var/mail" = {
44 target = "${hostName}/backup/mermet/var/mail";
46 "backup@mermet.${networking.domain}:rpool/var/postgresql" = {
48 target = "${hostName}/backup/mermet/var/postgresql";
50 "backup@mermet.${networking.domain}:rpool/var/prosody" = {
52 target = "${hostName}/backup/mermet/var/prosody";
54 "backup@mermet.${networking.domain}:rpool/var/public-inbox" = {
56 target = "${hostName}/backup/mermet/var/public-inbox";
58 "backup@mermet.${networking.domain}:rpool/var/www" = {
60 target = "${hostName}/backup/mermet/var/www";
62 "backup@mermet.${networking.domain}:rpool/var/git" = {
64 target = "${hostName}/backup/mermet/var/git";
66 "backup@mermet.${networking.domain}:rpool/var/redis-rspamd" = {
68 target = "${hostName}/backup/mermet/var/redis-rspamd";
70 "backup@mermet.${networking.domain}:rpool/home/julm/mail" = {
72 target = "${hostName}/backup/mermet/home/julm/mail";
74 "backup@mermet.${networking.domain}:rpool/home/julm/log" = {
76 target = "${hostName}/backup/mermet/home/julm/log";