diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2024-06-10 13:13:11 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2024-06-11 00:18:33 +0200 |
commit | 1c90c0dd73b5b74612be736ac8deeaa4547e2c26 (patch) | |
tree | 80a7bfcecd7478fb42c57616f706c90441475b88 /flakes/private | |
parent | e8d50f14185867d490f002aa5c408343ea5ea062 (diff) | |
download | Nix-1c90c0dd73b5b74612be736ac8deeaa4547e2c26.tar.gz Nix-1c90c0dd73b5b74612be736ac8deeaa4547e2c26.tar.zst Nix-1c90c0dd73b5b74612be736ac8deeaa4547e2c26.zip |
Migrate to borg backup
Diffstat (limited to 'flakes/private')
-rw-r--r-- | flakes/private/chatons/flake.lock | 2 | ||||
-rw-r--r-- | flakes/private/environment/flake.nix | 41 | ||||
-rw-r--r-- | flakes/private/mail-relay/flake.lock | 2 | ||||
-rw-r--r-- | flakes/private/milters/flake.lock | 2 | ||||
-rw-r--r-- | flakes/private/monitoring/flake.lock | 2 | ||||
-rw-r--r-- | flakes/private/opendmarc/flake.lock | 2 | ||||
-rw-r--r-- | flakes/private/ssh/flake.lock | 2 | ||||
-rw-r--r-- | flakes/private/system/flake.lock | 2 |
8 files changed, 46 insertions, 9 deletions
diff --git a/flakes/private/chatons/flake.lock b/flakes/private/chatons/flake.lock index 5e84cc2..2925f6c 100644 --- a/flakes/private/chatons/flake.lock +++ b/flakes/private/chatons/flake.lock | |||
@@ -3,7 +3,7 @@ | |||
3 | "environment": { | 3 | "environment": { |
4 | "locked": { | 4 | "locked": { |
5 | "lastModified": 1, | 5 | "lastModified": 1, |
6 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 6 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
7 | "path": "../environment", | 7 | "path": "../environment", |
8 | "type": "path" | 8 | "type": "path" |
9 | }, | 9 | }, |
diff --git a/flakes/private/environment/flake.nix b/flakes/private/environment/flake.nix index 24cbb7a..49b203e 100644 --- a/flakes/private/environment/flake.nix +++ b/flakes/private/environment/flake.nix | |||
@@ -369,6 +369,36 @@ | |||
369 | }; | 369 | }; |
370 | }; | 370 | }; |
371 | }; | 371 | }; |
372 | borg_backup = mkOption { | ||
373 | description = '' | ||
374 | Remote backup with borg/borgmatic | ||
375 | ''; | ||
376 | type = submodule { | ||
377 | options = { | ||
378 | password = mkOption { type = str; description = "Password for encrypting files"; }; | ||
379 | remotes = mkOption { | ||
380 | type = attrsOf (submodule { | ||
381 | options = { | ||
382 | remote = mkOption { | ||
383 | type = functionTo str; | ||
384 | example = literalExample '' | ||
385 | bucket: "ssh://some_host/${bucket}"; | ||
386 | ''; | ||
387 | description = '' | ||
388 | Function. | ||
389 | Takes a bucket name as argument and returns a url | ||
390 | ''; | ||
391 | }; | ||
392 | sshRsyncPort = mkOption { type = str; default = "22"; description = "SSH port"; }; | ||
393 | sshRsyncHost = mkOption { type = nullOr str; default = null; description = "SSH host"; }; | ||
394 | |||
395 | sshKnownHosts = mkOption { type = nullOr str; default = null; description = "Ssh known hosts"; }; | ||
396 | }; | ||
397 | }); | ||
398 | }; | ||
399 | }; | ||
400 | }; | ||
401 | }; | ||
372 | backup = mkOption { | 402 | backup = mkOption { |
373 | description = '' | 403 | description = '' |
374 | Remote backup with duplicity | 404 | Remote backup with duplicity |
@@ -379,6 +409,9 @@ | |||
379 | remotes = mkOption { | 409 | remotes = mkOption { |
380 | type = attrsOf (submodule { | 410 | type = attrsOf (submodule { |
381 | options = { | 411 | options = { |
412 | remote_type = mkOption { | ||
413 | type = enum [ "s3" "rsync" ]; | ||
414 | }; | ||
382 | remote = mkOption { | 415 | remote = mkOption { |
383 | type = functionTo str; | 416 | type = functionTo str; |
384 | example = literalExample '' | 417 | example = literalExample '' |
@@ -389,8 +422,12 @@ | |||
389 | Takes a bucket name as argument and returns a url | 422 | Takes a bucket name as argument and returns a url |
390 | ''; | 423 | ''; |
391 | }; | 424 | }; |
392 | accessKeyId = mkOption { type = str; description = "Remote access-key"; }; | 425 | sshRsyncPort = mkOption { type = str; default = "22"; description = "SSH port for rsync"; }; |
393 | secretAccessKey = mkOption { type = str; description = "Remote access secret"; }; | 426 | sshRsyncHost = mkOption { type = nullOr str; default = null; description = "SSH host for rsync"; }; |
427 | |||
428 | sshKnownHosts = mkOption { type = nullOr str; default = null; description = "Ssh known hosts"; }; | ||
429 | s3AccessKeyId = mkOption { type = nullOr str; default = null; description = "Remote access-key"; }; | ||
430 | s3SecretAccessKey = mkOption { type = nullOr str; default = null; description = "Remote access secret"; }; | ||
394 | }; | 431 | }; |
395 | }); | 432 | }); |
396 | }; | 433 | }; |
diff --git a/flakes/private/mail-relay/flake.lock b/flakes/private/mail-relay/flake.lock index d1447b7..69406f1 100644 --- a/flakes/private/mail-relay/flake.lock +++ b/flakes/private/mail-relay/flake.lock | |||
@@ -3,7 +3,7 @@ | |||
3 | "environment": { | 3 | "environment": { |
4 | "locked": { | 4 | "locked": { |
5 | "lastModified": 1, | 5 | "lastModified": 1, |
6 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 6 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
7 | "path": "../environment", | 7 | "path": "../environment", |
8 | "type": "path" | 8 | "type": "path" |
9 | }, | 9 | }, |
diff --git a/flakes/private/milters/flake.lock b/flakes/private/milters/flake.lock index e2366fa..31d3d4c 100644 --- a/flakes/private/milters/flake.lock +++ b/flakes/private/milters/flake.lock | |||
@@ -3,7 +3,7 @@ | |||
3 | "environment": { | 3 | "environment": { |
4 | "locked": { | 4 | "locked": { |
5 | "lastModified": 1, | 5 | "lastModified": 1, |
6 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 6 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
7 | "path": "../environment", | 7 | "path": "../environment", |
8 | "type": "path" | 8 | "type": "path" |
9 | }, | 9 | }, |
diff --git a/flakes/private/monitoring/flake.lock b/flakes/private/monitoring/flake.lock index e76ca08..ed94c2b 100644 --- a/flakes/private/monitoring/flake.lock +++ b/flakes/private/monitoring/flake.lock | |||
@@ -3,7 +3,7 @@ | |||
3 | "environment": { | 3 | "environment": { |
4 | "locked": { | 4 | "locked": { |
5 | "lastModified": 1, | 5 | "lastModified": 1, |
6 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 6 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
7 | "path": "../environment", | 7 | "path": "../environment", |
8 | "type": "path" | 8 | "type": "path" |
9 | }, | 9 | }, |
diff --git a/flakes/private/opendmarc/flake.lock b/flakes/private/opendmarc/flake.lock index a2eea1a..e9a1014 100644 --- a/flakes/private/opendmarc/flake.lock +++ b/flakes/private/opendmarc/flake.lock | |||
@@ -3,7 +3,7 @@ | |||
3 | "environment": { | 3 | "environment": { |
4 | "locked": { | 4 | "locked": { |
5 | "lastModified": 1, | 5 | "lastModified": 1, |
6 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 6 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
7 | "path": "../environment", | 7 | "path": "../environment", |
8 | "type": "path" | 8 | "type": "path" |
9 | }, | 9 | }, |
diff --git a/flakes/private/ssh/flake.lock b/flakes/private/ssh/flake.lock index d1447b7..69406f1 100644 --- a/flakes/private/ssh/flake.lock +++ b/flakes/private/ssh/flake.lock | |||
@@ -3,7 +3,7 @@ | |||
3 | "environment": { | 3 | "environment": { |
4 | "locked": { | 4 | "locked": { |
5 | "lastModified": 1, | 5 | "lastModified": 1, |
6 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 6 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
7 | "path": "../environment", | 7 | "path": "../environment", |
8 | "type": "path" | 8 | "type": "path" |
9 | }, | 9 | }, |
diff --git a/flakes/private/system/flake.lock b/flakes/private/system/flake.lock index 49fb3b5..ec1b023 100644 --- a/flakes/private/system/flake.lock +++ b/flakes/private/system/flake.lock | |||
@@ -19,7 +19,7 @@ | |||
19 | "environment": { | 19 | "environment": { |
20 | "locked": { | 20 | "locked": { |
21 | "lastModified": 1, | 21 | "lastModified": 1, |
22 | "narHash": "sha256-VO82m/95IcX3xxJ63wcLh3hXzXDRFKUohYil/18pBSY=", | 22 | "narHash": "sha256-Kj3j/3B8V8IHbeSZ3ho33C7ktOcTle2h6dKEWWfVuvU=", |
23 | "path": "../environment", | 23 | "path": "../environment", |
24 | "type": "path" | 24 | "type": "path" |
25 | }, | 25 | }, |