Configure secrets for restic backup
This commit is contained in:
@@ -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.
Reference in New Issue
Block a user