aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/databases/couchdb.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/databases/couchdb.nix')
-rw-r--r--nixpkgs/nixos/modules/services/databases/couchdb.nix25
1 files changed, 24 insertions, 1 deletions
diff --git a/nixpkgs/nixos/modules/services/databases/couchdb.nix b/nixpkgs/nixos/modules/services/databases/couchdb.nix
index 53224db1d89..f385331e878 100644
--- a/nixpkgs/nixos/modules/services/databases/couchdb.nix
+++ b/nixpkgs/nixos/modules/services/databases/couchdb.nix
@@ -11,7 +11,13 @@ let
database_dir = ${cfg.databaseDir}
uri_file = ${cfg.uriFile}
view_index_dir = ${cfg.viewIndexDir}
- '' + (if useVersion2 then
+ '' + (if cfg.adminPass != null then
+ ''
+ [admins]
+ ${cfg.adminUser} = ${cfg.adminPass}
+ '' else
+ ''
+ '') + (if useVersion2 then
''
[chttpd]
'' else
@@ -54,6 +60,23 @@ in {
'';
};
+ adminUser = mkOption {
+ type = types.str;
+ default = "admin";
+ description = ''
+ Couchdb (i.e. fauxton) account with permission for all dbs and
+ tasks.
+ '';
+ };
+
+ adminPass = mkOption {
+ type = types.nullOr types.str;
+ default = null;
+ description = ''
+ Couchdb (i.e. fauxton) account with permission for all dbs and
+ tasks.
+ '';
+ };
user = mkOption {
type = types.str;