···1717{
1818 port = 9342;
1919 extraOpts = {
2020+ user = mkOption {
2121+ type = types.str;
2222+ default = "frr";
2323+ description = ''
2424+ User name under which the frr exporter shall be run.
2525+ The exporter talks to frr using a unix socket, which is owned by frr.
2626+ '';
2727+ };
2828+ group = mkOption {
2929+ type = types.str;
3030+ default = "frrtty";
3131+ description = ''
3232+ Group under which the frr exporter shall be run.
3333+ The exporter talks to frr using a unix socket, which is owned by frrtty group.
3434+ '';
3535+ };
2036 enabledCollectors = mkOption {
2137 type = types.listOf types.str;
2238 default = [ ];
···3854 serviceConfig = {
3955 DynamicUser = false;
4056 RuntimeDirectory = "prometheus-frr-exporter";
5757+ RestrictAddressFamilies = [ "AF_UNIX" ];
4158 ExecStart = ''
4259 ${lib.getExe pkgs.prometheus-frr-exporter} \
4360 ${concatMapStringsSep " " (x: "--collector." + x) cfg.enabledCollectors} \