···29 description = "The config directory, for the access keys and other settings.";
30 };
31000000000000000000000000000000000032 package = mkOption {
33 default = pkgs.minio;
34 defaultText = "pkgs.minio";
···56 User = "minio";
57 Group = "minio";
58 LimitNOFILE = 65536;
0000000059 };
60 };
61
···29 description = "The config directory, for the access keys and other settings.";
30 };
3132+ accessKey = mkOption {
33+ default = "";
34+ type = types.str;
35+ description = ''
36+ Access key of 5 to 20 characters in length that clients use to access the server.
37+ This overrides the access key that is generated by minio on first startup and stored inside the
38+ <literal>configDir</literal> directory.
39+ '';
40+ };
41+42+ secretKey = mkOption {
43+ default = "";
44+ type = types.str;
45+ description = ''
46+ Specify the Secret key of 8 to 40 characters in length that clients use to access the server.
47+ This overrides the secret key that is generated by minio on first startup and stored inside the
48+ <literal>configDir</literal> directory.
49+ '';
50+ };
51+52+ region = mkOption {
53+ default = "us-east-1";
54+ type = types.str;
55+ description = ''
56+ 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.
57+ '';
58+ };
59+60+ browser = mkOption {
61+ default = true;
62+ type = types.bool;
63+ description = "Enable or disable access to web UI.";
64+ };
65+66 package = mkOption {
67 default = pkgs.minio;
68 defaultText = "pkgs.minio";
···90 User = "minio";
91 Group = "minio";
92 LimitNOFILE = 65536;
93+ };
94+ environment = {
95+ MINIO_REGION = "${cfg.region}";
96+ MINIO_BROWSER = "${if cfg.browser then "on" else "off"}";
97+ } // optionalAttrs (cfg.accessKey != "") {
98+ MINIO_ACCESS_KEY = "${cfg.accessKey}";
99+ } // optionalAttrs (cfg.secretKey != "") {
100+ MINIO_SECRET_KEY = "${cfg.secretKey}";
101 };
102 };
103