restic: Make repository variable (in module)
This commit is contained in:
parent
f0e2843d19
commit
3d146db55c
|
@ -3,6 +3,7 @@ let
|
||||||
cfg = config.sbruder.restic;
|
cfg = config.sbruder.restic;
|
||||||
|
|
||||||
name = "${config.networking.hostName}-system";
|
name = "${config.networking.hostName}-system";
|
||||||
|
repository = "s3:https://s3.eu-central-1.wasabisys.com/sbruder-restic";
|
||||||
excludes = [
|
excludes = [
|
||||||
# General
|
# General
|
||||||
"/home/*/Downloads/"
|
"/home/*/Downloads/"
|
||||||
|
@ -66,9 +67,9 @@ in
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.restic.backups."${name}" = {
|
services.restic.backups."${name}" = {
|
||||||
|
inherit repository;
|
||||||
passwordFile = toString <secrets/restic-password>;
|
passwordFile = toString <secrets/restic-password>;
|
||||||
s3CredentialsFile = toString <secrets/restic-s3>;
|
s3CredentialsFile = toString <secrets/restic-s3>;
|
||||||
repository = "s3:https://s3.eu-central-1.wasabisys.com/sbruder-restic";
|
|
||||||
paths = lib.mkDefault (
|
paths = lib.mkDefault (
|
||||||
[ ]
|
[ ]
|
||||||
++ maybePath /data
|
++ maybePath /data
|
||||||
|
|
Loading…
Reference in a new issue