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:
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user