proemtheus/packet-sd: use nixpkgs package
Martin Weinelt committed
Feb 28, 2024 at 16:50 UTC
1bceeb757bfaec11e228fa81114bc41e79e3f534
2 files changed
+1
-28
delft/pluto/prometheus/exporters/packages/packet-sd.nix
deleted
-23
@@ -1,23 +0,0 @@
1
-{ buildGoModule, fetchFromGitHub, lib }:
2
-buildGoModule rec {
3
- pname = "prometheus-packet-sd";
4
- version = "v0.0.3";
5
-
6
- src = fetchFromGitHub {
7
- owner = "packethost";
8
- repo = "prometheus-packet-sd";
9
- rev = "v0.0.3";
10
- sha256 = "sha256-2k8AsmyhQNNZCzpVt6JdgvI8IFb5pRi4ic6Yn2NqHMM=";
11
- };
12
-
13
- vendorSha256 = null;
14
-
15
- subPackages = [ "." ];
16
-
17
- meta = with lib; {
18
- description = "Prometheus service discovery for Packet.";
19
- homepage = "https://github.com/packethost/prometheus-packet-sd";
20
- license = licenses.asl20;
21
- platforms = platforms.linux;
22
- };
23
-}
delft/pluto/prometheus/exporters/packet-sd.nix
+1
-5
@@ -3,10 +3,6 @@
3
, ...
4
}:
5
6
-let
7
- packet-sd = pkgs.callPackage ./packages/packet-sd.nix { };
8
-in
9
-
6
{
7
age.secrets.packet-sd-env = {
8
file = ../../../secrets/packet-sd-env.age;
@@ -37,7 +33,7 @@ in
33
serviceConfig = {
34
User = "packet-sd";
35
Group = "keys";
40
- ExecStart = "${packet-sd}/bin/prometheus-packet-sd --output.file=/var/lib/packet-sd/packet-sd.json";
36
+ ExecStart = "${pkgs.packet-sd}/bin/prometheus-packet-sd --output.file=/var/lib/packet-sd/packet-sd.json";
37
EnvironmentFile = config.age.secrets.packet-sd-env.path;
38
Restart = "always";
39
RestartSec = "60s";