1 { pkgs, lib, config, hostName, hosts, ... }:
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"
55 serviceConfig.Group = groups."disk".name;
58 "${hostName}/home/julm/work" = {
60 target = "backup@mermet.${networking.domain}:rpool/backup/${hostName}/home/julm/work";
63 // mermet2losurdo "var" {
66 "--exclude=rpool/var/cache"
67 "--exclude=rpool/var/log"
68 "--exclude=rpool/var/tmp"
71 // mermet2losurdo "home/julm/mail" {}
72 // mermet2losurdo "home/julm/log" {}
73 // losurdo2das1 "home/julm/work" {}
74 // losurdo2das1 "var/sftp" {}
75 // losurdo2das1 "var/git" {}