Configure secrets for restic backup

This commit is contained in:
2024-07-12 23:21:24 -07:00
parent 9b8a6c9771
commit 6bedd27dea
2 changed files with 9 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, config, ... }:
{ pkgs, config, secrets, ... }:
{
environment.systemPackages = with pkgs; [
restic
@@ -24,6 +24,14 @@
};
};
environment.etc = {
"restic-env".text = ''
export B2_ACCOUNT_ID="${secrets.b2.accountId}"
export B2_ACCOUNT_KEY="${secrets.b2.accountKey}"
'';
"restic-password".text = secrets.restic.password;
};
services.restic.backups = {
b2 = {
initialize = true;

Binary file not shown.