nixos-module/collectd/default: fix user
This commit is contained in:
parent
4f42b64b18
commit
9e16a4284f
|
@ -13,7 +13,6 @@ let
|
|||
customTypesDb = builtins.toFile "types.db" ''
|
||||
stations value:GAUGE:0:U
|
||||
'';
|
||||
user = config.services.collectd.user;
|
||||
isUpstream =
|
||||
builtins.match "upstream.*" hostName != null ||
|
||||
builtins.match "anon.*" hostName != null;
|
||||
|
@ -91,15 +90,15 @@ in
|
|||
else maxTimeout
|
||||
) 180 (builtins.attrNames config.site.net);
|
||||
in ''
|
||||
Exec "${user}" "${pkgs.ruby}/bin/ruby" "${./dhcpcount.rb}" "${toString maxTimeout}"
|
||||
Exec "nobody" "${pkgs.ruby}/bin/ruby" "${./dhcpcount.rb}" "${toString maxTimeout}"
|
||||
'';
|
||||
}) (lib.optionalAttrs config.services.unbound.enable {
|
||||
plugins.exec = ''
|
||||
Exec "${user}" "${pkgs.ruby}/bin/ruby" "${./unbound.rb}"
|
||||
Exec "nobody" "${pkgs.ruby}/bin/ruby" "${./unbound.rb}"
|
||||
'';
|
||||
}) (lib.optionalAttrs hasStarlink {
|
||||
plugins.exec = ''
|
||||
Exec "${user}" "${self.packages.${system}.starlink-stats}/bin/starlink-stats" "192.168.100.1:9200"
|
||||
Exec "nobody" "${self.packages.${system}.starlink-stats}/bin/starlink-stats" "192.168.100.1:9200"
|
||||
'';
|
||||
}) ];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue