Merge branch 'master' into staging
This commit is contained in:
@@ -259,7 +259,7 @@ in {
|
||||
'';
|
||||
};
|
||||
incrementalRepairOptions = mkOption {
|
||||
type = types.listOf types.string;
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "--partitioner-range" ];
|
||||
description = ''
|
||||
@@ -267,7 +267,7 @@ in {
|
||||
'';
|
||||
};
|
||||
maxHeapSize = mkOption {
|
||||
type = types.nullOr types.string;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "4G";
|
||||
description = ''
|
||||
@@ -287,7 +287,7 @@ in {
|
||||
'';
|
||||
};
|
||||
heapNewSize = mkOption {
|
||||
type = types.nullOr types.string;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "800M";
|
||||
description = ''
|
||||
@@ -352,11 +352,11 @@ in {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
username = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
description = "Username for JMX";
|
||||
};
|
||||
password = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
description = "Password for JMX";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -56,7 +56,7 @@ in {
|
||||
|
||||
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "couchdb";
|
||||
description = ''
|
||||
User account under which couchdb runs.
|
||||
@@ -64,7 +64,7 @@ in {
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "couchdb";
|
||||
description = ''
|
||||
Group account under which couchdb runs.
|
||||
@@ -106,7 +106,7 @@ in {
|
||||
};
|
||||
|
||||
bindAddress = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
description = ''
|
||||
Defines the IP address by which CouchDB will be accessible.
|
||||
@@ -138,7 +138,7 @@ in {
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = types.string;
|
||||
type = types.path;
|
||||
description = ''
|
||||
Configuration file for persisting runtime changes. File
|
||||
needs to be readable and writable from couchdb user/group.
|
||||
|
||||
@@ -140,7 +140,7 @@ in
|
||||
};
|
||||
|
||||
logSize = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "10MiB";
|
||||
description = ''
|
||||
Roll over to a new log file after the current log file
|
||||
@@ -149,7 +149,7 @@ in
|
||||
};
|
||||
|
||||
maxLogSize = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "100MiB";
|
||||
description = ''
|
||||
Delete the oldest log file when the total size of all log
|
||||
@@ -171,7 +171,7 @@ in
|
||||
};
|
||||
|
||||
memory = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "8GiB";
|
||||
description = ''
|
||||
Maximum memory used by the process. The default value is
|
||||
@@ -193,7 +193,7 @@ in
|
||||
};
|
||||
|
||||
storageMemory = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "1GiB";
|
||||
description = ''
|
||||
Maximum memory used for data storage. The default value is
|
||||
|
||||
@@ -53,7 +53,7 @@ in {
|
||||
|
||||
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "hbase";
|
||||
description = ''
|
||||
User account under which HBase runs.
|
||||
@@ -61,7 +61,7 @@ in {
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "hbase";
|
||||
description = ''
|
||||
Group account under which HBase runs.
|
||||
|
||||
@@ -129,13 +129,13 @@ in
|
||||
user = mkOption {
|
||||
default = "influxdb";
|
||||
description = "User account under which influxdb runs";
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
default = "influxdb";
|
||||
description = "Group under which influxdb runs";
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
|
||||
@@ -65,9 +65,9 @@ in
|
||||
default = false;
|
||||
description = "Enable client authentication. Creates a default superuser with username root!";
|
||||
};
|
||||
|
||||
|
||||
initialRootPassword = mkOption {
|
||||
type = types.nullOr types.string;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Password for the root user if auth is enabled.";
|
||||
};
|
||||
|
||||
@@ -47,26 +47,26 @@ in
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "openldap";
|
||||
description = "User account under which slapd runs.";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "openldap";
|
||||
description = "Group account under which slapd runs.";
|
||||
};
|
||||
|
||||
urlList = mkOption {
|
||||
type = types.listOf types.string;
|
||||
type = types.listOf types.str;
|
||||
default = [ "ldap:///" ];
|
||||
description = "URL list slapd should listen on.";
|
||||
example = [ "ldaps:///" ];
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.string;
|
||||
type = types.path;
|
||||
default = "/var/db/openldap";
|
||||
description = "The database directory.";
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ in {
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "opentsdb";
|
||||
description = ''
|
||||
User account under which OpenTSDB runs.
|
||||
@@ -42,7 +42,7 @@ in {
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "opentsdb";
|
||||
description = ''
|
||||
Group account under which OpenTSDB runs.
|
||||
|
||||
@@ -8,17 +8,19 @@ let
|
||||
condOption = name: value: if value != null then "${name} ${toString value}" else "";
|
||||
|
||||
redisConfig = pkgs.writeText "redis.conf" ''
|
||||
pidfile ${cfg.pidFile}
|
||||
port ${toString cfg.port}
|
||||
${condOption "bind" cfg.bind}
|
||||
${condOption "unixsocket" cfg.unixSocket}
|
||||
daemonize yes
|
||||
supervised systemd
|
||||
loglevel ${cfg.logLevel}
|
||||
logfile ${cfg.logfile}
|
||||
syslog-enabled ${redisBool cfg.syslog}
|
||||
pidfile /run/redis/redis.pid
|
||||
databases ${toString cfg.databases}
|
||||
${concatMapStrings (d: "save ${toString (builtins.elemAt d 0)} ${toString (builtins.elemAt d 1)}\n") cfg.save}
|
||||
dbfilename ${cfg.dbFilename}
|
||||
dir ${toString cfg.dbpath}
|
||||
dbfilename dump.rdb
|
||||
dir /var/lib/redis
|
||||
${if cfg.slaveOf != null then "slaveof ${cfg.slaveOf.ip} ${toString cfg.slaveOf.port}" else ""}
|
||||
${condOption "masterauth" cfg.masterAuth}
|
||||
${condOption "requirepass" cfg.requirePass}
|
||||
@@ -40,7 +42,12 @@ in
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable the Redis server.";
|
||||
description = ''
|
||||
Whether to enable the Redis server. Note that the NixOS module for
|
||||
Redis disables kernel support for Transparent Huge Pages (THP),
|
||||
because this features causes major performance problems for Redis,
|
||||
e.g. (https://redis.io/topics/latency).
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
@@ -50,18 +57,6 @@ in
|
||||
description = "Which Redis derivation to use.";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "redis";
|
||||
description = "User account under which Redis runs.";
|
||||
};
|
||||
|
||||
pidFile = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/redis/redis.pid";
|
||||
description = "";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 6379;
|
||||
@@ -95,7 +90,7 @@ in
|
||||
type = with types; nullOr path;
|
||||
default = null;
|
||||
description = "The path to the socket to bind to.";
|
||||
example = "/run/redis.sock";
|
||||
example = "/run/redis/redis.sock";
|
||||
};
|
||||
|
||||
logLevel = mkOption {
|
||||
@@ -131,18 +126,6 @@ in
|
||||
example = [ [900 1] [300 10] [60 10000] ];
|
||||
};
|
||||
|
||||
dbFilename = mkOption {
|
||||
type = types.str;
|
||||
default = "dump.rdb";
|
||||
description = "The filename where to dump the DB.";
|
||||
};
|
||||
|
||||
dbpath = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/redis";
|
||||
description = "The DB will be written inside this directory, with the filename specified using the 'dbFilename' configuration.";
|
||||
};
|
||||
|
||||
slaveOf = mkOption {
|
||||
default = null; # { ip, port }
|
||||
description = "An attribute set with two attributes: ip and port to which this redis instance acts as a slave.";
|
||||
@@ -170,12 +153,6 @@ in
|
||||
description = "By default data is only periodically persisted to disk, enable this option to use an append-only file for improved persistence.";
|
||||
};
|
||||
|
||||
appendOnlyFilename = mkOption {
|
||||
type = types.str;
|
||||
default = "appendonly.aof";
|
||||
description = "Filename for the append-only file (stored inside of dbpath)";
|
||||
};
|
||||
|
||||
appendFsync = mkOption {
|
||||
type = types.str;
|
||||
default = "everysec"; # no, always, everysec
|
||||
@@ -217,27 +194,30 @@ in
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
};
|
||||
|
||||
users.users.redis =
|
||||
{ name = cfg.user;
|
||||
description = "Redis database user";
|
||||
};
|
||||
users.users.redis.description = "Redis database user";
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
systemd.services.disable-transparent-huge-pages = {
|
||||
description = "Disable Transparent Huge Pages (required by Redis)";
|
||||
before = [ "redis.service" ];
|
||||
wantedBy = [ "redis.service" ];
|
||||
script = "echo never > /sys/kernel/mm/transparent_hugepage/enabled";
|
||||
serviceConfig.Type = "oneshot";
|
||||
};
|
||||
|
||||
systemd.services.redis =
|
||||
{ description = "Redis Server";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
preStart = ''
|
||||
install -d -m0700 -o ${cfg.user} ${cfg.dbpath}
|
||||
chown -R ${cfg.user} ${cfg.dbpath}
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package}/bin/redis-server ${redisConfig}";
|
||||
User = cfg.user;
|
||||
RuntimeDirectory = "redis";
|
||||
StateDirectory = "redis";
|
||||
Type = "notify";
|
||||
User = "redis";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ in
|
||||
};
|
||||
|
||||
nodeName = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "riak@127.0.0.1";
|
||||
description = ''
|
||||
Name of the Erlang node.
|
||||
@@ -37,7 +37,7 @@ in
|
||||
};
|
||||
|
||||
distributedCookie = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "riak";
|
||||
description = ''
|
||||
Cookie for distributed node communication. All nodes in the
|
||||
|
||||
Reference in New Issue
Block a user