diff options
Diffstat (limited to 'flakes/private/environment/flake.nix')
-rw-r--r-- | flakes/private/environment/flake.nix | 41 |
1 files changed, 39 insertions, 2 deletions
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 | }; |