Commit graph

336 commits

Author SHA1 Message Date
Jörg Thalheim c9c8a2c5b3 nixos/memcached: make unix sockets usuable
before:
  - /var/run/memcached is a bad default for a socket path, since its
    parent directory must be writeable by memcached.
  - Socket directory was not created by the module itself -> this was
    left as a burden to the user?
  - Having a static uid with a dynamic user name is not very useful.

after:
  - Replace services.memcached.socket by a boolean flag. This simplifies
    our code, since we do not have to check if the user specifies a
    path with a parent directory that should be owned by memcached
    (/run/memcached/memcached.sock -> /run/memcached).
  - Remove fixed uid/gid allocation. The only file ever owned by the
    daemon is the socket that will be recreated on every start.
    Therefore user and group ids do not need to be static.
  - only create the memcached user, if the user has not specified a
    different one. The major use case for changing option is to allow
    existing services (such as php-fpm) opening the local unix socket.
    If we would unconditionally create a user that option would be
    useless.
2018-01-03 12:33:36 +01:00
Jörg Thalheim 453e15ec91 nixos/redis: remove static uid/gid assignment
all files are chowned on startup
2018-01-03 11:18:04 +01:00
Robin Gloster 86c7db0ac4 mysql module: cleanup obsolete checks 2017-12-29 02:18:35 +01:00
Franz Pletz 903a7e2f94
Merge pull request #31641 from danbst/patch-13
mysql module: fix flaky check
2017-11-16 00:07:55 +01:00
Danylo Hlynskyi 9f7315caf2
mysql module: fix flaky check
Comparing packages via equality will lead to different results when package and module are from different
`nixpkgs` checkouts.

Also, because MariaDB is actually supported, added a note to option description to make this knowledge more discover-able.
2017-11-14 03:08:15 +02:00
Maximilian Bosch 82062f7080
services.postgres: fix quoting in the description of superUser
`nixos-option` evals the description and the '`' is used to
define shell commands.

Due to this, the following error appears:

```
$ nixos-option services.postgresql.superUser
Value:
"root"

Default:
"root"

Description:

/run/current-system/sw/bin/nixos-option: line 294: root: command not found
/run/current-system/sw/bin/nixos-option: line 294: postgres: command not found
NixOS traditionally used  as superuser, most other distros use .
From 17.09 we also try to follow this standard. Internal since changing this value
would lead to breakage while setting up databases.
```
2017-11-13 22:22:35 +01:00
Raphael Das Gupta 27c8fd24e5 nixos/mysql: fix typo in description of mysql.bind option 2017-11-07 11:09:40 +01:00
Bas van Dijk c894327215 postage: replaced by pgmanage-10.0.2
postage is no longer maintained and has been replaced by the identical pgmanage. See:

https://github.com/workflowproducts/postage#postage-has-been-replaced-with-pgmanage

The following error is raised when a user enables the deprecated `services.postage.enable` option:

Failed assertions:
- services.postage is deprecated in favor of pgmanage. They have the same options so just substitute postage for pgmanage.
2017-11-03 00:14:00 +01:00
Kranium Gikos 412fa16bff influxdb sevice: make postStart test work with non-localhost configurations (#29734)
make postStart test work with non-localhost configurations
2017-09-24 15:37:17 +01:00
Florian Jacob 839e3c7666 nixos/mysql: declarative users & databases
using Unix socket authentication, ensured on every rebuild.
2017-09-18 13:10:26 +02:00
Kranium Gikos 662b409b72 influxdb service: fixup postStart script to handle TLS 2017-09-18 11:56:30 +02:00
Franz Pletz 1bed4773f5
postgresql92: remove last references 2017-09-05 18:20:56 +02:00
Philipp Steinpass d784b83005 nixos/hydra postgresql: Fix #27314 and add test case 2017-09-02 23:07:42 +02:00
Florian Jacob d22c1c0719 mysql service: Make initialDatabases.schema attribute optional 2017-08-31 11:32:25 +02:00
Joachim F 3e21f91a39 Merge pull request #27796 from LumiGuide/postage
postage: init at 3.2.17 & add NixOS module
2017-08-13 20:59:06 +00:00
Peter Hoeg b6f7713d33 Merge pull request #28127 from peterhoeg/f/collectd
influxdb (on nixos): reduce closure size by 99.99% (and a bit)
2017-08-12 00:01:46 +08:00
Peter Hoeg 211593fe49 influxdb nixos module: allow customizing the collectd dependency 2017-08-11 22:12:49 +08:00
Bas van Dijk ca64eaadf8 postage: init at 3.2.17 & add NixOS module 2017-08-07 20:35:23 +02:00
makefu c8e96826ae
influxdb module: collectd.port is now called bind-address
with the influxdb release we have packaged (and newer releases)
collectd.port has been streamlined to bind-address which takes a string
instead of a number.

ref: https://github.com/influxdata/influxdb/blob/master/services/collectd/README.md
2017-08-06 14:49:56 +02:00
Mateusz Kowalczyk 93d364f4f5 mongodb: we already set quiet in config 2017-07-27 13:26:36 +01:00
Joachim F 8791cad96b Merge pull request #26598 from moretea/mysql-add-bind-option
mysql module: add option to bind to an address
2017-06-27 19:43:41 +01:00
Calvin Cheng 3270545094 rethinkdb service: initial implementation 2017-06-27 02:09:15 +02:00
Maarten Hoogendoorn d847b5c763 mysql module: add option to bind to an address 2017-06-15 16:08:15 +02:00
Pascal Bach de52d2450e Cleanup PostgreSQL for state version 17.09 (#25753)
* postgresql service: make 9.6 the default version for 17.09

* postgresql service: change default superuser for 17.09

Change the default superuser from `root` to `postgres` for state
version 17.09

* postgresql service: change default data directory for 17.09

The new directory includes the schema version of the database.
This makes upgrades easier and is more consistent with other distros.

* updated nixos release notes
2017-05-30 21:05:39 +01:00
Pascal Bach f469bd83bb mysql service: change default data directory for 17.09
The new directory is now moved to /var/lib/mysql. This makes it consistent with
with upstream.
2017-05-20 15:46:13 +02:00
Orivej Desh 8f634a78b9 clickhouse: init at 1.1.54190 2017-04-27 13:25:58 +00:00
Franz Pletz 3ab45f4b36
treewide: use boolToString function 2017-04-11 18:18:53 +02:00
Will Dietz cb73cb9e62 neo4j service: neo4j-wrapper is deprecated, merge into neo4j.conf 2017-03-19 16:56:53 -05:00
Will Dietz 515fc22263 neo4j service: fix package installed into env to match running service 2017-03-19 16:56:52 -05:00
Will Dietz 63f1a14ae5 neo4j service: increase file limit, per warning emitted at startup (#23961) 2017-03-18 01:03:09 +01:00
Franz Pletz 9536169074
nixos/treewide: remove boolean examples for options
They contain no useful information and increase the length of the
autogenerated options documentation.

See discussion in #18816.
2017-03-17 23:36:19 +01:00
Daiderd Jordan 00ed0f792e Merge pull request #22897 from timor/couchdb-2.0.0
couchdb: add support for version 2.0.0
2017-03-16 22:03:32 +01:00
timor f40b961378 couchdb: add support for version 2.0.0
Version 2.0.0 is installed as a separate package called "couchdb2".
When setting the config option "package" attribute to pkgs.couchdb2, a
corresponding service configuration will be generated.  If a previous
1.6 installation exists, the databases can still be found on the local
port (default: 5986) and can be replicated from there.

Note that single-node or cluster setup still needs to be configured
manually, as described in
http://docs.couchdb.org/en/2.0.0/install/index.html.
2017-03-06 11:42:02 +01:00
Léo Gaspard 0e2bd7e248 openldap module: fix paths for example includes 2017-03-04 13:30:29 +01:00
Will Dietz bc15b4222b nixos/neo4j: Update to default JVM options from current release.
The options previously listed here were the defaults back in 2.1.x.
2017-02-23 08:41:29 -06:00
Matthew Daiter 336d6cc513 stanchion: remove ssl option 2017-02-17 13:24:51 +01:00
Joachim Fasting 142930113c
Revert "mysql service: specify a default package"
This reverts commit 4358d3d439.

Not having a default was deliberate, see
1ce6fff4e2

Thanks to @ocharles for making me aware of this.
2016-12-17 22:36:38 +01:00
Joachim Fasting c2219007e8
Revert "mysql service: specify defaultText for package option"
This reverts commit 52d12b473a.
2016-12-17 22:36:15 +01:00
Joachim Fasting 19b96176b4
couchdb service: fix test in preStart
Otherwise you'd get errors like "-f no such command".
2016-12-10 20:35:20 +01:00
Matthew Daiter f11899798e riak: added extraAdvancedConfig option to service module 2016-11-21 15:46:04 +01:00
Daiderd Jordan 86310553ca Merge pull request #20598 from mdaiter/riak_defaultText
riak: add defaultText to service
2016-11-21 12:38:18 +01:00
Matthew Daiter c51847e121 stanchion: added default 2016-11-21 12:35:08 +01:00
Matthew Daiter 68827cd79a riak-cs: init at 2.1.1
riak-cs: added to all-packages

Added Riak CS nix file to pkgs

Added service file for Riak CS

Removed Erlang_basho specific bindings from the Riak CS repo

riak-cs: changed description

riak-cs: added license

riak-cs: added maintainer

riak_cs: chgned indentations

riak-cs: removed overly complex srcs mechanism

riak-cs: added systemd module

riak-cs: changed Erlang module to Basho-specific version

riak-cs: made modular form

riak-cs: Added a default package in service options

riak-cs: Fixed default package in service options

riak-cs: Patched Makefile

riak_cs: added to module-list

riak_cs: changed from string to actual package in modules

riak-cs: changed example

riak-cs: removed default

riak-cs: changed to defaultText

stanchion: changed default option to defaultText

riak-cs: added defaults; changed types to str
2016-11-21 12:30:11 +01:00
Matthew Daiter ab43f932ce riak: add defaultText to service
riak: add default to service
2016-11-21 12:26:48 +01:00
Matthew Daiter 709631b47f stanchion: changed default option to defaultText 2016-11-21 12:07:06 +01:00
James Cook fc10bf81a1 Revert "riak-cs: add to nixpkgs" 2016-11-20 19:48:28 -08:00
Matthew Daiter bfc1ba475a riak-cs: init at 2.1.1
riak-cs: added to all-packages

Added Riak CS nix file to pkgs

Added service file for Riak CS

Removed Erlang_basho specific bindings from the Riak CS repo

riak-cs: changed description

riak-cs: added license

riak-cs: added maintainer

riak_cs: chgned indentations

riak-cs: removed overly complex srcs mechanism

riak-cs: added systemd module

riak-cs: changed Erlang module to Basho-specific version

riak-cs: made modular form

riak-cs: Added a default package in service options

riak-cs: Fixed default package in service options

riak-cs: Patched Makefile

riak_cs: added to module-list

riak_cs: changed from string to actual package in modules
2016-11-20 23:55:17 +01:00
Matthew Daiter f7c097556b stanchion: init at 2.1.1 2016-11-20 23:17:49 +01:00
Jörg Thalheim eb3f23d9ba
openldap: apply correct type for configDir
null is not a path
2016-10-23 16:00:22 +02:00
Kranium Gikos Mendoza 1e3f622dbd openldap: set configDir as null
fixes an error #19794 with this new option f3404b7 when using plain configuration files
2016-10-23 11:55:23 +00:00
Jörg Thalheim 4bb91b315d Merge pull request #19601 from Hinidu/fix/neo4j-update-3
neo4j: 2.1.3 -> 3.0.6
2016-10-22 19:49:37 +02:00
Jörg Thalheim 6f99aa9a7e Merge pull request #19289 from DerTim1/openldap-add-configDir-option
openldap: add configDir option
2016-10-22 09:33:15 +02:00
Pavel Platto b835446563 neo4j: 2.1.3 -> 3.0.6 2016-10-16 17:11:05 +02:00
Tim Digel f3404b71a7 Add configDir option 2016-10-10 07:18:06 +02:00
Joachim Fasting 52d12b473a
mysql service: specify defaultText for package option
Also provide an example that differs from the default.
2016-10-09 11:28:51 +02:00
Joachim Fasting 4358d3d439
mysql service: specify a default package
A config ought to be buildable using just the defaults.
2016-10-03 23:08:32 +02:00
Joachim Fasting c2153538d9
mysql service: add some option types
Note that this changes the type and default value of port to int
(previously default was a string, no type).
2016-10-03 23:08:31 +02:00
Joachim Fasting 88265c8238
mysql service: order after network.target 2016-10-03 23:08:26 +02:00
Joachim F 0906a0f197 Merge pull request #18491 from groxxda/network-interfaces
Replace Network-interfaces.target
2016-10-02 16:34:37 +02:00
Charles Strahan 3fe8eca17b Merge pull request #18853 from kvz/patch-2
Run riak with its `dataDir` as `HOME` so Erlang cookie can be written
2016-09-22 20:51:25 -04:00
Kevin van Zonneveld 6d3b06ce37 Run riak with its dataDir as HOME so Erlang cookie can be written
See https://github.com/NixOS/nixpkgs/issues/18852
2016-09-22 22:49:30 +02:00
Kevin van Zonneveld 6ee89c907c Remove reference to riak2
As mentioned by LnL in IRC, we

> used to have riak and riak2

But this seems no longer the case, hence the example should be updated.
2016-09-21 14:34:31 +02:00
Domen Kožar 001d314e87 Merge pull request #18574 from ericsagnes/feat/mongodb
MongoDB service: switch configuration format to YAML
2016-09-21 14:19:17 +02:00
Alexander Ried e52418fd08 monetdb module: remove since it's not packaged 2016-09-19 23:11:13 +02:00
Eric Sagnes 5cd565e507 mongodb service: switch configuration format to YAML
Configuration format has changed from MongoDB 2.6 to
YAML and MongoDB 2.4 is EOL since March 2016.
2016-09-18 09:29:35 +09:00
Eric Sagnes 2d2c311304 cadvisor test: fix (#18671)
* influxdb module: add postStart

* cadvisor module: increase TimeoutStartSec

Under high load, the cadvisor module can take longer than the default 90
seconds to start. This change should hopefully fix the test on Hydra.
2016-09-16 22:06:16 +02:00
Joachim Fasting 54b3e4fdf6 neo4j service: network-interfaces.target -> network.target 2016-09-13 11:19:22 +02:00
Joachim Fasting 167eef2bab influxdb service: network-interfaces.target -> network.target 2016-09-13 11:19:22 +02:00
Joachim Fasting 926428bdb5 cassandra service: network-interfaces.target -> network.target 2016-09-13 11:19:21 +02:00
Alexander Ried 27bc34f1e4 treewide: deprecate ip-up.target (#18319)
Systemd upstream provides targets for networking. This also includes a target network-online.target.

In this PR I remove / replace most occurrences since some of them were even wrong and could delay startup.
2016-09-10 18:03:59 +02:00
Lancelot SIX 5b8072fff6
postgresql: Fix use with extensions
Fixes #15512 and #16032

With the multi output, postgresql cannot find at runtime what is its
basedir when looking for libdir and pkglibdir. This commit fixes that.
2016-09-02 11:51:21 +02:00
Domen Kožar e01e92f12f Merge pull request #15025 from ericsagnes/modules/manual
manual: automatically generate modules documentation
2016-08-28 13:57:34 +02:00
Bjørn Forsman 26f65ae860 nixos/redis: enforce owner/perms on /var/lib/redis (#18046)
Previously it was only set once, now it is enforced on each start-up of
redis.service. Also set _ownership_ recursively, so that the
/var/lib/redis/dump.rdb file is guaranteed to be accessible by the
currently configured redis user.

Fixes issue #9687, where redis wouldn't start because /var/lib/redis had
wrong owner.
2016-08-28 08:05:14 +00:00
Eric Sagnes 4cdfeb78f9 modules: move meta at top level 2016-08-11 00:29:48 +09:00
obadz 52a875fb23 further fix manual evaluation
cc @cransom @domenkozar

See also 9ecc587 5ccfe7e
2016-08-10 15:51:01 +01:00
Domen Kožar 5ccfe7e8f2 fix manual evaluation 2016-08-10 16:12:05 +02:00
Casey Ransom 9ecc587e3b cassandra service: init
The module will configure a Cassandra server with common options being
tweakable. Included is also a test which will spin up 3 nodes and
verify that the cluster can be formed, broken, and repaired.
2016-08-02 20:58:35 -04:00
ben smith c38e6a2a60 mysql: fix replication tests (#17174)
Eliminate race condition in replication test
Remove replication configuration from standalone test
Improve mysql command syntax consistency
2016-07-23 00:37:05 +02:00
ben smith e641974f06 MySQL Replication (that actually works) (#7198)
Improves replication functionality by:
 * adding slaveHost on the 'master' role
 * adds slave user to master with replication only permissions
2016-07-21 02:15:55 +02:00
Joachim Fasting c7ca9faa51 Merge pull request #16148 from womfoo/openldap
openldap: add -h urlList in service so LDAP TLS could be enabled
2016-06-16 16:37:55 +02:00
Kranium Gikos Mendoza f79930849a openldap: add -h urlList in service so LDAP TLS could be enabled 2016-06-14 23:47:02 +08:00
Kranium Gikos Mendoza 64328ca475 openldap: fix example for multiple-outputs and formatting 2016-06-05 13:40:26 +08:00
Ben Smith 3a1beb6347
redis service: add firewall and VM overcommit options
- Add vm.over_commit setting for background saving
- Add openFirewall setting

Closes #10193
2016-05-21 18:17:36 +02:00
Al Zohali fb6ea3dead postgresql service: initialScript fixup 2016-04-23 22:28:12 +03:00
Vladimír Čunát d039c87984 Merge branch 'master' into closure-size 2016-02-14 08:33:51 +01:00
Eelco Dolstra fd8bd17c3e postgresql: Bump default version to 9.5 2016-02-12 13:20:11 +01:00
Nikolay Amiantov 90ef11ddcd postgresql service: don't use su 2016-02-10 02:12:05 +03:00
Vladimír Čunát 716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Thomas Strobel a04a7272aa Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
2016-01-17 19:41:23 +01:00
Tom Burdick 2c23a311cd postgresql: (94 -> 95)
Updates postgresql to its latest versions
2016-01-08 10:13:01 -06:00
Robin Gloster 88292fdf09 jobs -> systemd.services 2016-01-07 06:39:06 +00:00
Bjørn Forsman 873a9202f6 nixos/neo4j: rename 'host' to 'listenAddress'
More descriptive option name.
2015-12-24 00:01:02 +01:00
Luca Bruno a412927924 Merge remote-tracking branch 'origin/master' into closure-size 2015-11-25 21:37:30 +01:00
Vladimír Čunát 333d69a5f0 Merge staging into closure-size
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
2015-11-20 14:32:58 +01:00
Jaka Hudoklin 9c1943fb6f influxdb: 0.8.3 -> 0.9.4, fix module 2015-11-16 14:22:08 +01:00
Luca Bruno ff02152def nixos/postgresql: fix extraPlugins example with a working one 2015-11-01 14:15:43 +01:00
Tuomas Tynkkynen b4118c7f04 openldap: Split into multiple outputs
Also fix the incorrect .la file fixups.
2015-10-28 10:23:00 +01:00
aszlig 60d407b209
nixos/postgresql: Fix execution of initialScript.
Regression introduced by b21fd5d066.

The initialScript is only executed whenever there is a .first-startup in
the dataDir, so silently dropping the file essentially breaks
initialScript functionality.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-10-25 16:05:14 +01:00
Vladimír Čunát 99e4371526 curl: split into multiple outputs
Also use pkgconfig to be safer and fix (some) referrers.
2015-10-13 20:18:48 +02:00
Rickard Nilsson c0a83cbc49 opentsdb nixos module: Add option for defining OpenTSDB's configuration 2015-09-30 18:31:27 +02:00
Bas van Dijk 1f1e02daad mysql: add nettools to path
The mysql_install_db command, called in preStart, needs the hostname command.
2015-09-08 10:32:37 +02:00
Eelco Dolstra ace332eb36 Set a default value for services.postgresql.package
This is finally possible now that we have ‘system.stateVersion’
(allowing the default package to change over time).
2015-07-27 20:30:10 +02:00
danbst 26d5a1fc62 postgresql: add reload command 2015-07-24 01:41:32 +00:00
Charles Strahan babb744b71 riak: new nixos service 2015-07-21 09:25:41 -04:00
William A. Kennington III b21fd5d066 nixos/postgresql: Fix initdb for existing, empty postgres partitions 2015-07-02 00:08:02 -07:00
Eelco Dolstra f667310c06 Use mkAfter for services.postgresql.authentication
Authentication methods are tried in order, so if another NixOS module
defines a specific ident mapping like

  local hydra all ident map=hydra-users

it should appear before the generic

  local all all ident
2015-07-01 13:49:02 +02:00
Eelco Dolstra c738b309ee types.uniq types.bool -> types.bool 2015-06-15 18:10:26 +02:00
Rob Vermaas 6d859229e1 Remove unnecessary option. My mistake... 2015-06-10 08:36:55 +00:00
Rob Vermaas 42323dc155 Merge cwoac:mysql_socket 2015-06-10 08:31:12 +00:00
Joachim Schiele db79335c07 mysql: /run/mysql now 0755 (instead 0700)
see https://github.com/NixOS/nixpkgs/pull/7482
2015-05-07 01:51:05 +02:00
Oliver Matthews 0144849f67 Allow allowing local access to mysql socket 2015-04-15 14:35:38 +00:00
William A. Kennington III 8028357084 nixos/mysql: Cleanups 2015-03-31 16:17:55 -07:00
William A. Kennington III ca149f2be0 nixos/mysql: All versions of mysql have mysqld in /bin 2015-03-29 13:30:05 -07:00
lethalman b6672f232a Merge pull request #6283 from mdorman/master
Fix initial-install issues with couchdb.nix.
2015-02-26 10:11:18 +01:00
Jaka Hudoklin 1cddb5be20 mongodb: remove lock file on restart 2015-02-23 20:40:13 +01:00
Bjørn Forsman d5017499a2 nixos/redis: capitalize service description 2015-02-22 16:54:14 +01:00
Michael Alan Dorman f21cab27a4 Fix initial-install issues with couchdb.nix.
When starting from a clean slate, the couchdb service fails.

First, the pre-start script fails because it tries to chown the uriFile,
which doesn't exist.  It also doesn't ensure that the directory in which
the uriFIle is placed is writeable by couchdb, which could also cause
failure (though I didn't observe this).

Additionally, the log file's default location isn't a directory owned by
couchdb, nor is the file guaranteed to exist, nor is it guaranteed to be
chowned to the appropriate user.  All of which can cause unexpected
failure.

As a bonus I made a small change in the description of the configFile
attribute, in the hopes of making it a little more obvious why it
existed.
2015-02-11 20:42:52 -05:00
Domen Kožar 9df1bdefef Merge pull request #5982 from robberer/pkgs/openldap
openldap: add dataDir, use cfg.user and cfg.group to run slapd
2015-01-26 10:33:57 +01:00
Domen Kožar c1ce67561d openldap: correct directory hint 2015-01-26 10:03:25 +01:00
Longrin Wischnewski a4af32eec3 openldap: add dataDir, use cfg.user and cfg.group to run slapd 2015-01-26 09:35:56 +01:00
Domen Kožar 2daba83828 openldap: add example config 2015-01-25 21:15:29 +01:00
j-keck 3ced0d94ac doc: use postgresql94
update postgresql module doc to use postgresql94 (was postgresql93)
2015-01-07 13:21:18 +01:00
Oliver Charles ac616e17b3 opentsdb: Enable chunked API requests by default 2014-11-24 14:40:48 +00:00
Oliver Charles ced9e83732 OpenTSDB should create its schema on start up 2014-11-24 14:40:48 +00:00
Oliver Charles 5c670c81d5 hbase should use dataDir to specify where to store data 2014-11-24 14:40:48 +00:00
Oliver Charles 751a2943f4 opentsdb: Upgrade to 2.1.0-RC1 2014-11-24 14:40:47 +00:00
Oliver Charles 764cca613d opentsdb: New package and NixOS module 2014-11-24 14:40:47 +00:00
Oliver Charles 8964667bcd hbase: New package and NixOS module 2014-11-24 14:40:47 +00:00
Evgeny Egorochkin 599394162c update obsolete startOn values 2014-11-16 17:04:54 +02:00
Jaka Hudoklin 988ed87e70 nixos/neo4j: add package option 2014-10-18 13:18:37 +02:00
Tino Breddin eb7bbb4862 postgresql: use configured port when invoking psql 2014-09-27 14:37:11 +02:00
Jaka Hudoklin 996da030b6 nixos/mongodb: service fixes
- Log to syslog, so journal picks-up logs
- Start as foring service, so systemd will wait for service to start
- Add extraConfig option
2014-09-16 10:28:04 +02:00
Jaka Hudoklin 74122464da nixos/influxdb: wait for start 2014-09-13 02:19:39 +02:00
Eelco Dolstra 41788255ab Manual: Start of module-specific documentation 2014-08-27 12:24:44 +02:00
Jaka Hudoklin 84ea03fa3f nixos: add neo4j database module 2014-08-23 13:11:09 +04:00
Bjørn Forsman a4cf5e903b nixos/redis: fix evaluation
Commit 89fee1006c ("nixos/redis: clean up
option types") broke nixos evaluation:

  error: attempt to call something which is not a function but a set, at .../nixpkgs/nixos/modules/services/databases/redis.nix:111:28

Fix it.

Reported by Oliver Charles (thanks!).
2014-07-15 17:05:54 +02:00
Bjørn Forsman 89fee1006c nixos/redis: clean up option types
Some options lack a type and some use the deprecated "string" type. Fix
it.
2014-07-15 15:45:52 +02:00
Marc Weber 672adc126e nixos: add 'firebird' group
The firebird module complains without missing 'firebird' group, add it.
2014-07-08 00:00:33 +02:00
Shea Levy b3cfb9084b Get all lib functions from lib, not pkgs.lib, in modules 2014-07-02 12:28:18 -04:00
Michael Raskin 02266194ea Merge pull request #2894 from kirelagin/fixusergroup
Fix conditional handling of users and groups in some services
2014-06-30 10:16:20 +04:00
Bjørn Forsman 4def9a762f nixos: add some missing '.' in option descriptions 2014-06-24 21:25:11 +02:00
Kirill Elagin f81434bdfe Fix trying to add users to non-existent groups 2014-06-11 13:36:15 +04:00
Rok Garbas cc160a196a couchdb service: adding customizable config file which is writable by couchdb 2014-06-06 15:30:58 +01:00
Jaka Hudoklin 66456c0798 nixos: add influxdb module 2014-05-27 22:56:36 +02:00
Shea Levy 26d03000c2 Actually use services.mysql.port
Fixes #1315
2014-04-30 10:21:29 -04:00
Eelco Dolstra a142d68b43 Fix some uid/gid attributes to match the actual user/group name 2014-04-29 10:51:42 +02:00
Eelco Dolstra fec3bc85a6 postgresql: Use systemd's new "mixed" kill mode
"Mixed" mode sends the initial SIGINT only to the main process, but
sends the SIGKILL after the time-out expires to the entire cgroup.
2014-04-18 17:32:24 +02:00
Eelco Dolstra 29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Shea Levy 0122697550 Revert "Merge branch 'postgresql-user' of git://github.com/ocharles/nixpkgs"
Reverting postgres superuser changes until after stable.

This reverts commit 6cc0cc7ff6, reversing
changes made to 3c4be425db.
2014-04-11 19:23:03 -04:00
Shea Levy 9b077bac58 Revert "postgresql: properly fix permissions issue by in postStart"
Reverting postgres superuser changes until after stable.

This reverts commit c66be6378d.
2014-04-11 19:22:43 -04:00
Shea Levy e9e60103de Revert "Create the 'postgres' superuser"
Reverting postgres superuser changes until after stable.

This reverts commit 7de29bd26f.
2014-04-11 19:22:39 -04:00
Shea Levy c23050e231 Revert "Use PostgreSQL 9.3's pg_isready to wait for connectivity"
Reverting postgres superuser changes until after stable.

This reverts commit e206684110.
2014-04-11 19:21:50 -04:00
Shea Levy efdb8a10ed Merge branch 'postgresql-user-fix' of git://github.com/ocharles/nixpkgs into fix-new-conduit
Create 'postgres' user and use pg_isready
2014-04-07 16:37:43 -04:00
Oliver Charles e206684110 Use PostgreSQL 9.3's pg_isready to wait for connectivity
The postgresql module has a postStart section that waits for a database
to accept connections before continuing. However, this assumes various
properties about the database - specifically the database user
and (implicitly) the database name. This means that for old
installations, this command fails because there is no 'postgres' user,
and the service never starts.

While 7deff39 does create the 'postgres' user, a better solution is to
use `pg_isready`, who's sole purpose is to check if the database is
accepting connections. This has no dependency on users, so should be
more robust.
2014-04-06 12:38:02 +01:00
Oliver Charles 7de29bd26f Create the 'postgres' superuser
Old PostgreSQL installations were created using the 'root' database
user. In this case, we need to create a new 'postgres' account, as we
now assume that this is the superuser account.

Unfortunately, these machines will be left with a 'root' user as
well (which will have ownership of some databases). While PostgreSQL
does let you rename superuser accounts, you can only do that when you
are connected as a *different* database user. Thus we'd have to create a
special superuser account to do the renaming. As we default to using
ident authentication, we would have to create a system level user to do
this. This all feels rather complex, so I'm currently opting to keep the
'root' user on these old machines.
2014-04-06 12:38:01 +01:00
George Kollias 0ded8e6de3 Added MonetDB NixOS module. 2014-04-01 20:20:33 +03:00
Vladimir Kirillov c66be6378d postgresql: properly fix permissions issue by in postStart
as per postgresql manual, interactions with psql should be carried
out with the postgresql system user and postgresql db user by default.

ensure it happens in postStart.
2014-03-31 18:06:06 +08:00
Rickard Nilsson 043bf5a941 mysql service: Shutdown with normal systemd SIGTERM instead of mysqladmin
According to the MySQL manual, this is a perfectly legal way of
shutting down the server. The shutdown logs also looks fine:

systemd[1]: Stopping MySQL Server...
mysqld[5114]: 140319  8:36:12 [Note] /nix/store/sc26mz82k97mbpx3d1abzn3rrbd155ws-mariadb-10.0.8/bin/mysqld: Normal shutdown
mysqld[5114]: 140319  8:36:12 [Note] Event Scheduler: Purging the queue. 0 events
mysqld[5114]: 140319  8:36:12 [Note] InnoDB: FTS optimize thread exiting.
mysqld[5114]: 140319  8:36:12 [Note] InnoDB: Starting shutdown...
mysqld[5114]: 140319  8:36:14 [Note] InnoDB: Shutdown completed; log sequence number 1619078
mysqld[5114]: 140319  8:36:14 [Note] /nix/store/sc26mz82k97mbpx3d1abzn3rrbd155ws-mariadb-10.0.8/bin/mysqld: Shutdown complete
systemd[1]: Stopped MySQL Server.
2014-03-19 08:41:07 +01:00
Shea Levy 6cc0cc7ff6 Merge branch 'postgresql-user' of git://github.com/ocharles/nixpkgs
postgresql module: Use the default superuser username
2014-03-15 13:29:52 -04:00
Shea Levy 50d144278d mysql module: Specify --basedir
Needed for mariadb and safe for mysql
2014-03-14 11:56:54 -04:00
Jaka Hudoklin 993ef8287e nixos/couchdb: fix stopping of service, by making it non-forking, a few other improvments
Conflicts:
	nixos/modules/services/databases/couchdb.nix
2014-03-10 11:08:05 +01:00
Domen Kožar ab0aae42a4 couchdb: remove redundant customConfigFile 2014-02-27 14:34:19 +01:00
Domen Kožar d6a3cada9b couchdb: stricter types 2014-02-27 14:33:50 +01:00
Rok Garbas 0bebcd7d1f folders of pidFile and uriFile should be writable by couchdb user/group 2014-02-27 13:34:11 +01:00
Rok Garbas 55cff93f04 couchdb(nixos): removing whitespace and line that was commented 2014-02-27 13:34:11 +01:00
Rok Garbas 62438c09f7 update couchdb to 1.5.0(current latest) and add service for it 2014-02-27 13:34:11 +01:00
Domen Kožar 97a0dd9eb9 nixos: set all package options to have type package 2014-02-27 13:22:29 +01:00
Shea Levy 1ce6fff4e2 Merge mysql55 module into mysql
This also removes the default for services.mysql.package, as this should
not generally be updated automatically if we change the mysql attribute
2014-02-26 07:54:12 -05:00
Oliver Charles 2ea7c90839 postgresql module: Use the default superuser username
PostgreSQL defaults to having 'postgres' as the superuser. NixOS should
use this default name to provide a less surprising result to people who
enable services.postgres.
2014-02-13 18:52:59 +00:00
Oliver Charles 422f2032ab services.postgresql: Hint to use mkForce for authentication
This fixes #1395
2014-01-11 22:01:21 +00:00
Jaka Hudoklin 24e2ef5126 memcached: set uid to make it work with #1076 2013-12-13 10:09:08 +01:00
Eelco Dolstra 7809134e29 postgresql: Fix shutdown
Postgres was taking a long time to shutdown.  This is because we were
sending SIGINT to all processes, apparently confusing the autovacuum
launcher.  Instead it should only be sent to the main process (which
takes care of shutting down the others).

The downside is that systemd will also send the final SIGKILL only to
the main process, so other processes in the cgroup may be left behind.
There should be an option for this...
2013-12-03 12:04:20 -05:00
Domen Kožar 4da388351a Merge pull request #1292 from jozko/openldap-fixes
Added openldap user, group and configure service so its not running as root
2013-11-28 13:40:11 -08:00
Jozko Skrablin cb691265b6 Added openldap user, group and configure service so its not running as root. 2013-11-28 22:21:50 +01:00
Eelco Dolstra c6529ac9eb postgresql: Fix the port option
Also clarify the description of the enableTCPIP option.
2013-11-27 17:09:17 +01:00
Eelco Dolstra 2b0aea1793 Allow running NixOS services outside of systemd
The attribute ‘config.systemd.services.<service-name>.runner’
generates a script that runs the service outside of systemd.  This is
useful for testing, and also allows NixOS services to be used outside
of NixOS.  For instance, given a configuration file foo.nix:

  { config, pkgs, ... }:

  { services.postgresql.enable = true;
    services.postgresql.package = pkgs.postgresql92;
    services.postgresql.dataDir = "/tmp/postgres";
  }

you can build and run PostgreSQL as follows:

  $ nix-build -A config.systemd.services.postgresql.runner -I nixos-config=./foo.nix
  $ ./result

This will run the service's ExecStartPre, ExecStart, ExecStartPost and
ExecStopPost commands in an appropriate environment.  It doesn't work
well yet for "forking" services, since it can't track the main
process.  It also doesn't work for services that assume they're always
executed by root.
2013-11-18 18:04:17 +01:00
Jaka Hudoklin 50a2f3fdce nixos/mongodb: set static uid to work with #1076 2013-11-07 11:25:14 +01:00
Eelco Dolstra 244cf195c8 Use the "assertions" option instead of mkAssert 2013-10-30 18:47:44 +01:00
Eelco Dolstra 408b8b5725 Add lots of missing option types 2013-10-30 18:47:43 +01:00
Jaka Hudoklin d28a9619a1 nixos/redis: log to syslog by default 2013-10-28 18:18:24 +01:00
Jaka Hudoklin b20c08d2cb nixos/redis: user set uid, make it compatible #1076 2013-10-28 18:18:13 +01:00
Eelco Dolstra f79a7359b0 firebird.nix: Fix a misplaced } that causes "users" to be outside "config" 2013-10-25 15:52:52 +02:00
Eelco Dolstra a3777ba4f9 Remove dependencies on the Nixpkgs location 2013-10-23 20:08:23 +02:00
Marc Weber 6cb91c33d0 Firebird service:
* simplify directory layout
 * clean up option descriptions
 * let the user override Firebird package
 * create firebird user
 * clarify TODO comment

Close  # 1061.
2013-10-21 20:33:11 +03:00
Evgeny Egorochkin d2f612b1b6 postgresql.authMethod: remove unimplemented option.
close #1104.
2013-10-21 19:26:26 +03:00
Eelco Dolstra 5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00