restic mtls opts
This commit is contained in:
@@ -34,15 +34,17 @@
|
|||||||
RESTIC_TLS_CLIENT_CERT = mtlsClientCert;
|
RESTIC_TLS_CLIENT_CERT = mtlsClientCert;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# This is necessary because the restic service in home manager doesn't otherwise expose these options.
|
||||||
|
systemd.user.services."restic-backups-${cfg.repoName}".Service.Environment = [
|
||||||
|
"RESTIC_CACERT=${caCert}"
|
||||||
|
"RESTIC_TLS_CLIENT_CERT=${mtlsClientCert}"
|
||||||
|
];
|
||||||
|
|
||||||
services.restic = {
|
services.restic = {
|
||||||
enable = true;
|
enable = true;
|
||||||
backups.${cfg.repoName} = {
|
backups.${cfg.repoName} = {
|
||||||
repository = resticRepository;
|
repository = resticRepository;
|
||||||
passwordFile = cfg.passwordFile;
|
passwordFile = cfg.passwordFile;
|
||||||
extraBackupArgs = [
|
|
||||||
"--tls-client-cert ${mtlsClientCert}"
|
|
||||||
"--cacert ${caCert}"
|
|
||||||
];
|
|
||||||
paths = cfg.paths;
|
paths = cfg.paths;
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "00:05";
|
OnCalendar = "00:05";
|
||||||
@@ -83,6 +85,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user