Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 78 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@

e10-secrets.url = "git+ssh://git@github.com/ethnt/e10-secrets";
# e10-secrets.url = "git+file:///Users/ethan/Workspace/e10-secrets";

plex-exporter.url = "github:ethnt/plex_exporter";
plex-exporter.inputs.nixpkgs.follows = "nixpkgs";
};

outputs = inputs@{ self, flake-parts, ... }:
Expand Down
6 changes: 5 additions & 1 deletion hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ let
}));

commonModules = with inputs;
[ sops-nix.nixosModules.sops disko.nixosModules.disko ] ++ nixosModules;
[
plex-exporter.nixosModules.plex-exporter
sops-nix.nixosModules.sops
disko.nixosModules.disko
] ++ nixosModules;

# https://github.com/zhaofengli/colmena/issues/60#issuecomment-1047199551
extraModules = with inputs; [
Expand Down
2 changes: 1 addition & 1 deletion hosts/htpc/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
profiles.services.attic-watch-store.default
profiles.sharing.nfs-client
profiles.telemetry.prometheus-dcgm-exporter
profiles.telemetry.prometheus-plex-media-server-exporter.default
profiles.telemetry.prometheus-plex-exporter.default
profiles.virtualisation.docker
] ++ [ ./hardware-configuration.nix ./disk-config.nix ]
++ [ secrets.hosts.htpc.configuration ];
Expand Down
3 changes: 1 addition & 2 deletions hosts/monitor/profiles/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,7 @@
static_configs = [{
targets = [
"${hosts.htpc.config.networking.hostName}:${
toString
hosts.htpc.config.services.prometheus.exporters.plex-media-server.port
toString hosts.htpc.config.services.plex-exporter.port
}"
];
}];
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions modules/packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ _: {
mazanoke = pkgs.callPackage ./mazanoke { };
profilarr = pkgs.callPackage ./profilarr { };
profilarr-parser = pkgs.callPackage ./profilarr-parser { };
prometheus-plex-exporter =
pkgs.callPackage ./prometheus-plex-exporter { };
tracearr = pkgs.callPackage ./tracearr { };
unifi-os-server-image = pkgs.callPackage ./unifi-os-server-image { };
};
Expand Down
25 changes: 0 additions & 25 deletions modules/packages/prometheus-plex-exporter/default.nix

This file was deleted.

15 changes: 15 additions & 0 deletions modules/profiles/telemetry/prometheus-plex-exporter/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ inputs, config, pkgs, ... }: {
sops.secrets.plex_token = {
sopsFile = ./secrets.json;
mode = "0777";
};

services.plex-exporter = {
enable = true;
package =
inputs.plex-exporter.packages.${pkgs.stdenv.hostPlatform.system}.default;
url = "https://e10.video";
tokenFile = config.sops.secrets.plex_token.path;
openFirewall = true;
};
}
43 changes: 43 additions & 0 deletions modules/profiles/telemetry/prometheus-plex-exporter/secrets.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading