@cryptotaxi247 / infra / commits / a81b694f

Added CouchDB to configuration, setting some options - enough to run Mozilla Raindrop

svn path=/configurations/trunk/tud/; revision=18873

Michael Raskin committed Dec 10, 2009 at 13:10 UTC a81b694f84c38ee459567be4d9e8e652b13366b4
1 file changed +17 -3
couchdb.nix
+17 -3
@@ -7,7 +7,7 @@ let
7 modprobe = config.system.sbin.modprobe;
8
9 couchdbUser = "couchdb";
10 - couchdbFlags = "-c ${couchdbCfg}";
10 + couchdbFlags = "-a ${couchdbCfg}";
11 couchdbCfg = pkgs.writeText "couchdb.ini" ''
12 [Couch]
13 ConsoleStartupMsg=Apache CouchDB is starting.
@@ -20,6 +20,8 @@ let
20 LogLevel=info
21 [Couch Query Servers]
22 javascript=${couchdb}/bin/couchjs ${couchdb}/share/couchdb/server/main.js
23 +
24 + ${config.services.couchdb.extraIni}
25 '';
26
27 stateDir = "/var/spool/couchdb";
@@ -28,7 +30,8 @@ let
30 name = "couchdb-wrapper";
31 text = ''
32 #!/bin/sh
31 - HOME=${stateDir} ${couchdb}/bin/couchdb ${couchdbFlags}
33 + EXTRA_PATH="${config.services.couchdb.extraPath}"
34 + HOME=${stateDir} PATH="$PATH''${EXTRA_PATH:+:}$EXTRA_PATH" ${couchdb}/bin/couchdb ${couchdbFlags}
35 '';
36 executable = true;
37 destination = "/bin/couchdb";
@@ -66,7 +69,18 @@ in
69 Location of CouchDB log files
70 '';
71 };
69 -
72 + extraIni = mkOption {
73 + default = "";
74 + description = ''
75 + Extra text to put verbatim in ini file.
76 + '';
77 + };
78 + extraPath = mkOption {
79 + default = "";
80 + description =''
81 + Extra PATH for job
82 + '';
83 + };
84 };
85 };
86