feat: set up git hooks
This commit is contained in:
@@ -28,23 +28,25 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
sops.secrets.b2_bucket_name = { };
|
||||
sops = {
|
||||
secrets.b2_bucket_name = { };
|
||||
|
||||
sops.templates."restic/repo-${config.networking.hostName}" = {
|
||||
content = "b2:${config.sops.placeholder."b2_bucket_name"}:${config.networking.hostName}";
|
||||
};
|
||||
templates."restic/repo-${config.networking.hostName}" = {
|
||||
content = "b2:${config.sops.placeholder."b2_bucket_name"}:${config.networking.hostName}";
|
||||
};
|
||||
|
||||
sops.templates."restic/b2-env-${config.networking.hostName}" = {
|
||||
content = ''
|
||||
B2_ACCOUNT_ID=${config.sops.placeholder."b2_account_id"}
|
||||
B2_ACCOUNT_KEY=${config.sops.placeholder."b2_account_key"}
|
||||
'';
|
||||
templates."restic/b2-env-${config.networking.hostName}" = {
|
||||
content = ''
|
||||
B2_ACCOUNT_ID=${config.sops.placeholder."b2_account_id"}
|
||||
B2_ACCOUNT_KEY=${config.sops.placeholder."b2_account_key"}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.restic.backups.home = {
|
||||
repositoryFile = config.sops.templates."restic/repo-${config.networking.hostName}".path;
|
||||
passwordFile = cfg.passwordFile;
|
||||
paths = cfg.paths;
|
||||
inherit (cfg) passwordFile;
|
||||
inherit (cfg) paths;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
|
||||
Reference in New Issue
Block a user