summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorajs124 <ajs124@users.noreply.github.com>2021-12-14 10:48:56 +0000
committerGitHub <noreply@github.com>2021-12-14 10:48:56 +0000
commit84ce6a628656d9552306b30b37eacec33cb3ec5e (patch)
tree362fb11006f786bc8f42cd5d39094919f5a49b1d /nixos/modules/services/databases
parentc96de696f49b7216808e527df9b4a5101f6ceedc (diff)
parenta6196bc8b20472cd49fc55ca43c7be9dcc7cb624 (diff)
downloadnixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.tar
nixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.tar.gz
nixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.tar.bz2
nixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.tar.lz
nixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.tar.xz
nixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.tar.zst
nixpkgs-84ce6a628656d9552306b30b37eacec33cb3ec5e.zip
Merge pull request #149868 from lostnet/couchopts
couchdb3: add vm.args option and fix pkgs.couchdb reference
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/couchdb.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/nixos/modules/services/databases/couchdb.nix b/nixos/modules/services/databases/couchdb.nix
index 16dd64f2373..266bc82b696 100644
--- a/nixos/modules/services/databases/couchdb.nix
+++ b/nixos/modules/services/databases/couchdb.nix
@@ -43,8 +43,8 @@ in {
 
       package = mkOption {
         type = types.package;
-        default = pkgs.couchdb;
-        defaultText = literalExpression "pkgs.couchdb";
+        default = pkgs.couchdb3;
+        defaultText = literalExpression "pkgs.couchdb3";
         description = ''
           CouchDB package to use.
         '';
@@ -150,6 +150,14 @@ in {
         '';
       };
 
+      argsFile = mkOption {
+        type = types.path;
+        default = "${cfg.package}/etc/vm.args";
+        description = ''
+          vm.args configuration. Overrides Couchdb's Erlang VM parameters file.
+        '';
+      };
+
       configFile = mkOption {
         type = types.path;
         description = ''
@@ -186,12 +194,14 @@ in {
       '';
 
       environment = {
-        # we are actually specifying 4 configuration files:
+        # we are actually specifying 5 configuration files:
         # 1. the preinstalled default.ini
         # 2. the module configuration
         # 3. the extraConfig from the module options
         # 4. the locally writable config file, which couchdb itself writes to
         ERL_FLAGS= ''-couch_ini ${cfg.package}/etc/default.ini ${configFile} ${pkgs.writeText "couchdb-extra.ini" cfg.extraConfig} ${cfg.configFile}'';
+        # 5. the vm.args file
+        COUCHDB_ARGS_FILE=''${cfg.argsFile}'';
       };
 
       serviceConfig = {