diff options
author | Guillaume Girol <symphorien+git@xlumurb.eu> | 2021-08-08 12:00:00 +0000 |
---|---|---|
committer | Guillaume Girol <symphorien+git@xlumurb.eu> | 2021-09-12 14:59:30 +0200 |
commit | bc3bca822a32fbbc73a9d55394991cef92dba3b9 (patch) | |
tree | 04d54d294f1869dd6f874e92eb5f2c094eef3b7f /nixos/modules/services/databases | |
parent | 0f15a8f489b04a7d0086edf27920ba15fa1de0d3 (diff) | |
download | nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.tar nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.tar.gz nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.tar.bz2 nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.tar.lz nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.tar.xz nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.tar.zst nixpkgs-bc3bca822a32fbbc73a9d55394991cef92dba3b9.zip |
nixos: define the primary group of users where needed
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r-- | nixos/modules/services/databases/influxdb.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/databases/memcached.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/databases/mongodb.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/databases/neo4j.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/databases/redis.nix | 1 |
5 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/databases/influxdb.nix b/nixos/modules/services/databases/influxdb.nix index dd5d69b1147..3b8c00929ba 100644 --- a/nixos/modules/services/databases/influxdb.nix +++ b/nixos/modules/services/databases/influxdb.nix @@ -185,6 +185,7 @@ in users.users = optionalAttrs (cfg.user == "influxdb") { influxdb = { uid = config.ids.uids.influxdb; + group = "influxdb"; description = "Influxdb daemon user"; }; }; diff --git a/nixos/modules/services/databases/memcached.nix b/nixos/modules/services/databases/memcached.nix index ca7b20eb049..1c06937e2f3 100644 --- a/nixos/modules/services/databases/memcached.nix +++ b/nixos/modules/services/databases/memcached.nix @@ -67,7 +67,9 @@ in users.users = optionalAttrs (cfg.user == "memcached") { memcached.description = "Memcached server user"; memcached.isSystemUser = true; + memcached.group = "memcached"; }; + users.groups = optionalAttrs (cfg.user == "memcached") { memcached = {}; }; environment.systemPackages = [ memcached ]; diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix index db1e5fedf50..5121e0415db 100644 --- a/nixos/modules/services/databases/mongodb.nix +++ b/nixos/modules/services/databases/mongodb.nix @@ -123,9 +123,11 @@ in users.users.mongodb = mkIf (cfg.user == "mongodb") { name = "mongodb"; - uid = config.ids.uids.mongodb; + isSystemUser = true; + group = "mongodb"; description = "MongoDB server user"; }; + users.groups.mongodb = mkIf (cfg.user == "mongodb") {}; environment.systemPackages = [ mongodb ]; diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix index 53760bb24c4..2a30923538d 100644 --- a/nixos/modules/services/databases/neo4j.nix +++ b/nixos/modules/services/databases/neo4j.nix @@ -651,10 +651,12 @@ in { environment.systemPackages = [ cfg.package ]; users.users.neo4j = { - uid = config.ids.uids.neo4j; + isSystemUser = true; + group = "neo4j"; description = "Neo4j daemon user"; home = cfg.directories.home; }; + users.groups.neo4j = {}; }; meta = { diff --git a/nixos/modules/services/databases/redis.nix b/nixos/modules/services/databases/redis.nix index 8873f6d00e0..1b9358c81a1 100644 --- a/nixos/modules/services/databases/redis.nix +++ b/nixos/modules/services/databases/redis.nix @@ -246,6 +246,7 @@ in { users.users.redis = { description = "Redis database user"; + group = "redis"; isSystemUser = true; }; users.groups.redis = {}; |