3
0
Fork 0
forked from mirrors/nixpkgs

nixos/elasticsearch: Set a group on the user

This fixed a problem I had when running ElasticSearch in an LXC
container, and it doesn't hurt using a dedicated group instead of
nogroup anyway.
This commit is contained in:
Rickard Nilsson 2016-07-01 18:01:52 +02:00
parent 880475bbd5
commit 9facb7078b
2 changed files with 9 additions and 6 deletions

View file

@ -370,7 +370,7 @@
quassel = 89;
amule = 90;
minidlna = 91;
#elasticsearch = 92; # unused
elasticsearch = 92;
#tcpcryptd = 93; # unused
connman = 94;
firebird = 95;

View file

@ -157,11 +157,14 @@ in {
environment.systemPackages = [ cfg.package ];
users.extraUsers = singleton {
name = "elasticsearch";
uid = config.ids.uids.elasticsearch;
description = "Elasticsearch daemon user";
home = cfg.dataDir;
users = {
groups.elasticsearch.gid = config.ids.gids.elasticsearch;
users.elasticsearch = {
uid = config.ids.uids.elasticsearch;
description = "Elasticsearch daemon user";
home = cfg.dataDir;
group = "elasticsearch";
};
};
};
}