forked from Fediversity/Fediversity
39 lines
752 B
Nix
39 lines
752 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
serviceName,
|
||
|
serviceDocName,
|
||
|
}:
|
||
|
|
||
|
let
|
||
|
inherit (lib) mkOption mkEnableOption;
|
||
|
inherit (lib.types) types;
|
||
|
|
||
|
in
|
||
|
{
|
||
|
enable = mkEnableOption "Enable a ${serviceDocName} server on the machine";
|
||
|
|
||
|
s3AccessKey = mkOption {
|
||
|
type = types.str;
|
||
|
description = ''
|
||
|
S3 access key for ${serviceDocName}'s bucket/s
|
||
|
|
||
|
In AWS CLI, this would be AWS_ACCESS_KEY_ID.
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
s3SecretKey = mkOption {
|
||
|
description = ''
|
||
|
S3 secret key for ${serviceDocName}'s bucket/s
|
||
|
|
||
|
In AWS CLI, this would be AWS_SECRET_ACCESS_KEY.
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
domain = mkOption {
|
||
|
type = types.str;
|
||
|
description = "Internal option — change at your own risk";
|
||
|
default = "${serviceName}.${config.fediversity.domain}";
|
||
|
};
|
||
|
}
|