1 { lib, config, inputs, hostName, ... }:
3 inherit (config) networking;
4 inherit (config.services) syncoid;
5 inherit (config.users) groups;
6 losurdo2das1 = path: conf: lib.mapAttrs (_n: v: lib.recursiveUpdate v conf) {
7 "${hostName}/${path}2das1" = {
8 source = "${hostName}/${path}";
9 target = "das1/julm/backup/losurdo/${path}";
14 mermet2losurdo = path: conf: lib.mapAttrs (_n: v: lib.recursiveUpdate v conf) {
15 "backup@mermet.${networking.domain}:rpool/${path}" = {
16 target = "${hostName}/backup/mermet/${path}";
20 "${hostName}/backup/mermet/${path}" = {
21 target = "das1/julm/backup/mermet/${path}";
28 networking.nftables.ruleset = ''
31 skuid @nixos-syncoid-uids \
34 comment "syncoid: SSH"
38 systemd.tmpfiles.rules = [
39 "z /dev/zfs 0660 - disk -"
43 nftables.enable = true;
44 interval = "*-*-* *:05:00";
46 sshKey = "sshKey:${syncoid/sshKey.cred}";
51 #"--no-privilege-elevation"
53 #"--preserve-recordsize"
54 #"--preserve-properties"
57 serviceConfig.Group = groups."disk".name;
60 "${hostName}/home/julm/work" = {
62 target = "backup@mermet.${networking.domain}:rpool/backup/${hostName}/home/julm/work";
65 // mermet2losurdo "var" {
68 "--exclude=rpool/var/cache"
69 "--exclude=rpool/var/lib/nginx"
70 "--exclude=rpool/var/log"
71 "--exclude=rpool/var/tmp"
74 // mermet2losurdo "home/julm/mail" { }
75 // mermet2losurdo "home/julm/log" { }
76 // losurdo2das1 "home/julm/work" { }
77 // losurdo2das1 "var/sftp" { }
78 // losurdo2das1 "var/git" { }