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 skuid "${syncoid.user}" \
13 ip daddr ${hosts.mermet.extraArgs.ipv4} \
15 comment "SSH to mermet"
17 security.gnupg.secrets."ssh/backup.ssh-ed25519" = {
20 users.groups.keys.members = [ syncoid.user ];
21 systemd.tmpfiles.rules = [
22 "z /dev/zfs 0660 - disk -"
26 interval = "*-*-* *:05:00";
29 sshKey = gnupg.secrets."ssh/backup.ssh-ed25519".path;
33 #"--no-privilege-elevation"
37 after = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
38 wants = [ gnupg.secrets."ssh/backup.ssh-ed25519".service ];
41 "${hostName}/home/julm/work" = {
43 target = "backup@mermet.${networking.domain}:rpool/backup/${hostName}/home/julm/work";
45 "backup@mermet.${networking.domain}:rpool/var/mail" = {
47 target = "${hostName}/backup/mermet/var/mail";
49 "backup@mermet.${networking.domain}:rpool/var/prosody" = {
51 target = "${hostName}/backup/mermet/var/prosody";
53 "backup@mermet.${networking.domain}:rpool/var/public-inbox" = {
55 target = "${hostName}/backup/mermet/var/public-inbox";
57 "backup@mermet.${networking.domain}:rpool/var/www" = {
59 target = "${hostName}/backup/mermet/var/www";
61 "backup@mermet.${networking.domain}:rpool/var/git" = {
63 target = "${hostName}/backup/mermet/var/git";
65 "backup@mermet.${networking.domain}:rpool/var/redis" = {
67 target = "${hostName}/backup/mermet/var/redis";
69 "backup@mermet.${networking.domain}:rpool/home/julm/mail" = {
71 target = "${hostName}/backup/mermet/home/julm/mail";
73 "backup@mermet.${networking.domain}:rpool/home/julm/log" = {
75 target = "${hostName}/backup/mermet/home/julm/log";