Unverified Commit 518150a1 authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

prometheus-libvirt-exporter: refactor (#478425)

parents 09f388f4 42b7af82
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -10,11 +10,9 @@
let
  inherit (lib)
    concatStrings
    foldl
    foldl'
    genAttrs
    literalExpression
    maintainers
    mapAttrs
    mapAttrsToList
    mkDefault
@@ -22,9 +20,7 @@ let
    mkIf
    mkMerge
    mkOption
    optional
    types
    mkOptionDefault
    flip
    attrNames
    xor
@@ -328,6 +324,7 @@ let
          description = "Prometheus ${name} exporter service user";
          isSystemUser = true;
          inherit (conf) group;
          extraGroups = mkIf (name == "libvirt") [ "libvirtd" ];
        }
      );
      users.groups = mkMerge [
+5 −0
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@ in
        --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \
        --libvirt.uri ${cfg.libvirtUri} ${lib.concatStringsSep " " cfg.extraFlags}
      '';
      RestrictAddressFamilies = [
        "AF_UNIX"
        "AF_INET"
        "AF_INET6"
      ];
    };
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -30,5 +30,6 @@ buildGoModule (finalAttrs: {
    homepage = "https://github.com/Tinkoff/libvirt-exporter";
    license = lib.licenses.asl20;
    maintainers = [ ];
    mainProgram = "libvirt-exporter";
  };
})