Migrated Unifi Docker -> Nix

This commit is contained in:
2026-04-11 12:50:47 +02:00
parent bd62a4f942
commit 89d14a1615
2 changed files with 27 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../nixos/roles/wyl.nix ../../nixos/roles/wyl.nix
../../nixos/roles/unifi.nix
]; ];
networking = { networking = {

26
nixos/roles/unifi.nix Normal file
View File

@@ -0,0 +1,26 @@
{ pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
services.unifi = {
enable = true;
unifiPackage = pkgs.unifi;
mongodbPackage = pkgs.mongodb-7_0;
openFirewall = true; # opens 3478/udp, 10001/udp, 8080, 8443, 8843, 8880, 6789
};
networking.firewall = {
allowedTCPPorts = [
8443
8080
8880
8843
6789
];
allowedUDPPorts = [
3478
10001
];
};
}