cluster/services/storage: implement s3ql key format

This commit is contained in:
Max Headroom 2024-08-03 02:45:19 +02:00
parent a175d32b27
commit 45f78f8cf1

View file

@ -118,7 +118,7 @@ in
};
format = mkOption {
description = "Locksmith secret format.";
type = enum [ "files" "aws" "envFile" ];
type = enum [ "files" "aws" "envFile" "s3ql" ];
default = "files";
};
owner = mkOption {
@ -291,6 +291,12 @@ in
AWS_ACCESS_KEY_ID=@@GARAGE_KEY_ID@@
AWS_SECRET_ACCESS_KEY=@@GARAGE_SECRET_KEY@@
'';
s3ql = ''
[s3c]
storage-url: s3c4://
backend-login: @@GARAGE_KEY_ID@@
backend-password: @@GARAGE_SECRET_KEY@@
'';
}.${kCfg.locksmith.format};
in {
${key} = common // {