From 82c751a6e41bf0759ff30f57106860249cc0de10 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 4 Nov 2020 21:53:14 +0000 Subject: [PATCH] swann: install Unifi controller --- ops/nixos/swann/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ops/nixos/swann/default.nix b/ops/nixos/swann/default.nix index 791f25e7a6..7b427f0847 100644 --- a/ops/nixos/swann/default.nix +++ b/ops/nixos/swann/default.nix @@ -114,6 +114,23 @@ in { tc filter add dev ens-virginmedia parent ffff: matchall action mirred egress redirect dev ifb-virginmedia ''; + services.unifi = { + enable = true; + openPorts = false; + unifiPackage = pkgs.unifiBeta; + }; + + networking.firewall = { + interfaces.ens-general = { + allowedTCPPorts = [ + 8080 6789 # Unifi + ]; + allowedUDPPorts = [ + 3478 10001 # Unifi + ]; + }; + }; + environment.systemPackages = with pkgs; []; system.stateVersion = "21.03";