X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=flakes%2Fprivate%2Fenvironment%2Fflake.nix;fp=flakes%2Fprivate%2Fenvironment%2Fflake.nix;h=49b203e944dcf512c8e1caa25fb6a680827420d4;hb=1c90c0dd73b5b74612be736ac8deeaa4547e2c26;hp=24cbb7a0202e5ec97ad21e912754da52d03e3e67;hpb=e8d50f14185867d490f002aa5c408343ea5ea062;p=perso%2FImmae%2FConfig%2FNix.git 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 @@ }; }; }; + borg_backup = mkOption { + description = '' + Remote backup with borg/borgmatic + ''; + type = submodule { + options = { + password = mkOption { type = str; description = "Password for encrypting files"; }; + remotes = mkOption { + type = attrsOf (submodule { + options = { + remote = mkOption { + type = functionTo str; + example = literalExample '' + bucket: "ssh://some_host/${bucket}"; + ''; + description = '' + Function. + Takes a bucket name as argument and returns a url + ''; + }; + sshRsyncPort = mkOption { type = str; default = "22"; description = "SSH port"; }; + sshRsyncHost = mkOption { type = nullOr str; default = null; description = "SSH host"; }; + + sshKnownHosts = mkOption { type = nullOr str; default = null; description = "Ssh known hosts"; }; + }; + }); + }; + }; + }; + }; backup = mkOption { description = '' Remote backup with duplicity @@ -379,6 +409,9 @@ remotes = mkOption { type = attrsOf (submodule { options = { + remote_type = mkOption { + type = enum [ "s3" "rsync" ]; + }; remote = mkOption { type = functionTo str; example = literalExample '' @@ -389,8 +422,12 @@ Takes a bucket name as argument and returns a url ''; }; - accessKeyId = mkOption { type = str; description = "Remote access-key"; }; - secretAccessKey = mkOption { type = str; description = "Remote access secret"; }; + sshRsyncPort = mkOption { type = str; default = "22"; description = "SSH port for rsync"; }; + sshRsyncHost = mkOption { type = nullOr str; default = null; description = "SSH host for rsync"; }; + + sshKnownHosts = mkOption { type = nullOr str; default = null; description = "Ssh known hosts"; }; + s3AccessKeyId = mkOption { type = nullOr str; default = null; description = "Remote access-key"; }; + s3SecretAccessKey = mkOption { type = nullOr str; default = null; description = "Remote access secret"; }; }; }); };