3
0
Fork 0
forked from mirrors/nixpkgs

nixos/prometheus-exporters: fix user generation

This commit is contained in:
WilliButz 2019-09-01 12:31:30 +02:00
parent d9db65ce4b
commit 7786d0718c
No known key found for this signature in database
GPG key ID: 92582A10F1179CB2

View file

@ -132,14 +132,10 @@ let
in
mkIf conf.enable {
warnings = conf.warnings or [];
users.users = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = {
description = ''
Prometheus ${name} exporter service user
'';
users.users."${name}-exporter" = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
description = "Prometheus ${name} exporter service user";
isSystemUser = true;
inherit (conf) group;
};
});
users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) {
"${name}-exporter" = {};