···2929 description = "The config directory, for the access keys and other settings.";
3030 };
31313232+ accessKey = mkOption {
3333+ default = "";
3434+ type = types.str;
3535+ description = ''
3636+ Access key of 5 to 20 characters in length that clients use to access the server.
3737+ This overrides the access key that is generated by minio on first startup and stored inside the
3838+ <literal>configDir</literal> directory.
3939+ '';
4040+ };
4141+4242+ secretKey = mkOption {
4343+ default = "";
4444+ type = types.str;
4545+ description = ''
4646+ Specify the Secret key of 8 to 40 characters in length that clients use to access the server.
4747+ This overrides the secret key that is generated by minio on first startup and stored inside the
4848+ <literal>configDir</literal> directory.
4949+ '';
5050+ };
5151+5252+ region = mkOption {
5353+ default = "us-east-1";
5454+ type = types.str;
5555+ description = ''
5656+ The physical location of the server. By default it is set to us-east-1, which is same as AWS S3's and Minio's default region.
5757+ '';
5858+ };
5959+6060+ browser = mkOption {
6161+ default = true;
6262+ type = types.bool;
6363+ description = "Enable or disable access to web UI.";
6464+ };
6565+3266 package = mkOption {
3367 default = pkgs.minio;
3468 defaultText = "pkgs.minio";
···5690 User = "minio";
5791 Group = "minio";
5892 LimitNOFILE = 65536;
9393+ };
9494+ environment = {
9595+ MINIO_REGION = "${cfg.region}";
9696+ MINIO_BROWSER = "${if cfg.browser then "on" else "off"}";
9797+ } // optionalAttrs (cfg.accessKey != "") {
9898+ MINIO_ACCESS_KEY = "${cfg.accessKey}";
9999+ } // optionalAttrs (cfg.secretKey != "") {
100100+ MINIO_SECRET_KEY = "${cfg.secretKey}";
59101 };
60102 };
61103