forked from mirrors/nixpkgs
nixos/prometheus-exporters: fix user generation
This commit is contained in:
parent
d9db65ce4b
commit
7786d0718c
|
@ -132,14 +132,10 @@ let
|
||||||
in
|
in
|
||||||
mkIf conf.enable {
|
mkIf conf.enable {
|
||||||
warnings = conf.warnings or [];
|
warnings = conf.warnings or [];
|
||||||
users.users = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
|
users.users."${name}-exporter" = (mkIf (conf.user == "${name}-exporter" && !enableDynamicUser) {
|
||||||
"${name}-exporter" = {
|
description = "Prometheus ${name} exporter service user";
|
||||||
description = ''
|
|
||||||
Prometheus ${name} exporter service user
|
|
||||||
'';
|
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
inherit (conf) group;
|
inherit (conf) group;
|
||||||
};
|
|
||||||
});
|
});
|
||||||
users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) {
|
users.groups = (mkIf (conf.group == "${name}-exporter" && !enableDynamicUser) {
|
||||||
"${name}-exporter" = {};
|
"${name}-exporter" = {};
|
||||||
|
|
Loading…
Reference in a new issue