rippled module: optionSet -> submodule

+38 -40
+38 -40
nixos/modules/services/misc/rippled.nix
··· 154 154 }; 155 155 156 156 dbOptions = { 157 - type = mkOption { 158 - description = "Rippled database type."; 159 - type = types.enum ["rocksdb" "nudb"]; 160 - default = "rocksdb"; 161 - }; 157 + options = { 158 + type = mkOption { 159 + description = "Rippled database type."; 160 + type = types.enum ["rocksdb" "nudb"]; 161 + default = "rocksdb"; 162 + }; 162 163 163 - path = mkOption { 164 - description = "Location to store the database."; 165 - type = types.path; 166 - default = cfg.databasePath; 167 - }; 164 + path = mkOption { 165 + description = "Location to store the database."; 166 + type = types.path; 167 + default = cfg.databasePath; 168 + }; 168 169 169 - compression = mkOption { 170 - description = "Whether to enable snappy compression."; 171 - type = types.nullOr types.bool; 172 - default = null; 173 - }; 170 + compression = mkOption { 171 + description = "Whether to enable snappy compression."; 172 + type = types.nullOr types.bool; 173 + default = null; 174 + }; 174 175 175 - onlineDelete = mkOption { 176 - description = "Enable automatic purging of older ledger information."; 177 - type = types.addCheck (types.nullOr types.int) (v: v > 256); 178 - default = cfg.ledgerHistory; 179 - }; 176 + onlineDelete = mkOption { 177 + description = "Enable automatic purging of older ledger information."; 178 + type = types.addCheck (types.nullOr types.int) (v: v > 256); 179 + default = cfg.ledgerHistory; 180 + }; 180 181 181 - advisoryDelete = mkOption { 182 - description = '' 183 - If set, then require administrative RPC call "can_delete" 184 - to enable online deletion of ledger records. 185 - ''; 186 - type = types.nullOr types.bool; 187 - default = null; 188 - }; 182 + advisoryDelete = mkOption { 183 + description = '' 184 + If set, then require administrative RPC call "can_delete" 185 + to enable online deletion of ledger records. 186 + ''; 187 + type = types.nullOr types.bool; 188 + default = null; 189 + }; 189 190 190 - extraOpts = mkOption { 191 - description = "Extra database options."; 192 - type = types.lines; 193 - default = ""; 191 + extraOpts = mkOption { 192 + description = "Extra database options."; 193 + type = types.lines; 194 + default = ""; 195 + }; 194 196 }; 195 197 }; 196 198 ··· 213 215 214 216 ports = mkOption { 215 217 description = "Ports exposed by rippled"; 216 - type = types.attrsOf types.optionSet; 217 - options = [portOptions]; 218 + type = with types; attrsOf (submodule portOptions); 218 219 default = { 219 220 rpc = { 220 221 port = 5005; ··· 238 239 239 240 nodeDb = mkOption { 240 241 description = "Rippled main database options."; 241 - type = types.nullOr types.optionSet; 242 - options = dbOptions; 242 + type = with types; nullOr (submodule dbOptions); 243 243 default = { 244 244 type = "rocksdb"; 245 245 extraOpts = '' ··· 254 254 255 255 tempDb = mkOption { 256 256 description = "Rippled temporary database options."; 257 - type = types.nullOr types.optionSet; 258 - options = dbOptions; 257 + type = with types; nullOr (submodule dbOptions); 259 258 default = null; 260 259 }; 261 260 262 261 importDb = mkOption { 263 262 description = "Settings for performing a one-time import."; 264 - type = types.nullOr types.optionSet; 265 - options = dbOptions; 263 + type = with types; nullOr (submodule dbOptions); 266 264 default = null; 267 265 }; 268 266