diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-11-09 03:00:14 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-11-09 03:00:14 +0300 |
commit | 303b8e2ed8b836858b4dc6ca2210178ace9c6b6f (patch) | |
tree | eb0f4fbda60c70e86921109033c842fca1b3824f /nixosConfigurations | |
parent | 2023-11-05 (diff) |
2023-11-09
Diffstat (limited to 'nixosConfigurations')
-rw-r--r-- | nixosConfigurations/yavanna/default.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/nixosConfigurations/yavanna/default.nix b/nixosConfigurations/yavanna/default.nix index da74c03..4aacb9d 100644 --- a/nixosConfigurations/yavanna/default.nix +++ b/nixosConfigurations/yavanna/default.nix @@ -1,4 +1,10 @@ -{lib, ...}: +{ + config, + pkgs, + inputs, + lib, + ... +}: with lib; { nixfiles.modules = { wireguard.client.enable = true; @@ -12,6 +18,25 @@ with lib; { jackett.enable = true; }; + # TODO Wait for https://github.com/NixOS/nixpkgs/pull/265696 + disabledModules = ["services/monitoring/prometheus/exporters.nix"]; + imports = ["${inputs.nixpkgs-local}/nixos/modules/services/monitoring/prometheus/exporters.nix"]; + services.prometheus.exporters.exportarr-lidarr = { + enable = true; + url = "http://127.0.0.1"; + apiKeyFile = pkgs.writeText "api-key" "5a4311dd98a240b6a9fe0cac9146341e"; + port = mkDefault 9708; + inherit (config.services.lidarr) user; + inherit (config.services.lidarr) group; + listenAddress = this.wireguard.ipv4.address; + environment.CONFIG = "/var/lib/lidarr/.config/Lidarr/config.xml"; + }; + systemd.services.prometheus-exportarr-lidarr-exporter.serviceConfig = { + ProcSubset = "pid"; + ProtectProc = "invisible"; + SystemCallFilter = ["@system-service" "~@privileged"]; + }; + boot.loader.grub = { enable = true; device = "/dev/sda"; |