diff options
-rw-r--r-- | hosts/tahoe/secrets/secrets.nix | 5 | ||||
-rw-r--r-- | modules/services/unifi/default.nix | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/hosts/tahoe/secrets/secrets.nix b/hosts/tahoe/secrets/secrets.nix index 38bb1b0..2d23fda 100644 --- a/hosts/tahoe/secrets/secrets.nix +++ b/hosts/tahoe/secrets/secrets.nix @@ -29,7 +29,10 @@ in owner = "fcuny"; }; - "unifi/unifi-poller.age".publicKeys = all; + "unifi/unifi-poller.age" = { + publicKeys = all; + owner = "unpoller-exporter"; + }; "restic/repo-systems.age".publicKeys = all; "rclone/config.ini.age".publicKeys = all; diff --git a/modules/services/unifi/default.nix b/modules/services/unifi/default.nix index e5fc1fa..cc5ab69 100644 --- a/modules/services/unifi/default.nix +++ b/modules/services/unifi/default.nix @@ -37,7 +37,19 @@ in services.unifi = { enable = true; openFirewall = true; - unifiPackage = pkgs.unifiStable; + unifiPackage = pkgs.unifi7; + }; + + services.prometheus.exporters.unpoller = { + enable = true; + controllers = [ + { + user = "unifipoller"; + pass = secrets."unifi/unifi-poller".path; + url = "https://127.0.0.1:8443"; + verify_ssl = false; + } + ]; }; services.nginx.virtualHosts."${cfg.vhostName}" = { @@ -56,7 +68,7 @@ in } ]; locations."/" = { - proxyPass = "http://127.0.0.1:8443"; + proxyPass = "https://127.0.0.1:8443"; proxyWebsockets = true; }; }; |