Configure secrets for restic backup
This commit is contained in:
parent
9b8a6c9771
commit
6bedd27dea
2 changed files with 9 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, secrets, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
restic
|
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 = {
|
services.restic.backups = {
|
||||||
b2 = {
|
b2 = {
|
||||||
initialize = true;
|
initialize = true;
|
||||||
|
|
|
||||||
BIN
secrets.json
BIN
secrets.json
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue